Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2003 problem? (XP, 2003)

    I have a text box that shows current record count as X of Y. It has the following as data source

    ="Prospect " & [CurrentRecord] & " of " & [RecordSet].[RecordCount]

    It works well in Access Xp but in Access 2003 it displays #Name? What do I need to do to fix this? I tried to add an expression (frm) but it didn't work. Below is the what it looks like with the expression inserted.

    ="Prospect " & [frm.CurrentRecord] & " of " & [RecordSet].[RecordCount]

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 2003 problem? (XP, 2003)

    This is probably caused by the new "Sandbox Mode" security in Access 2003. The Recordset property of a form is not available in expressions when Sandbox Mode is on. See How to configure Jet 4.0 to prevent unsafe functions from running in Access 2003 for an overview. This MSKB article also explains how to turn Sandbox Mode on or off.

  3. #3
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2003 problem? (XP, 2003)

    Hmmm. Okay, I looked at that article, discovered my sandbox value was set to 3. I then changed my sandbox value to 2 (disable sandbox for Access but not for others) and also set it to 0 (disable for all). In either case, I had the same result - the usual warnings about unsafe code, the need to tall Access to open the DB anyway, and the record count still doesn't work.

    Is there a work around to "recordset.recordcount" that will allow me to use the sandbox security and still get an accurate record count... and, equally important, actually open the DB WITHOUT all the warnings?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 2003 problem? (XP, 2003)

    I don't have (and based on what I read here don't want) Access 2003, so I'm afraid I can't help here.

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: 2003 problem? (XP, 2003)

    Access 2003 has a Security Setting under Tools...Macro

    Set the Security Level to Low and you won't receive warnings , and your expression will work OK.
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •