Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Sep 2008
    Location
    Virginia, USA
    Posts
    27
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Access doesn't recognize "Date" or "Right" (Access 2007, Windows XP OS)

    Reports and subreports that have worked well for years recently began asking for parameters when encountering text boxes that involve either Date() or Right. E.g.,
    =IIf([stepdue]<Date() And [stepdone]=False,"Overdue","")

    =Right([txtgoalnumber],1)
    I replaced "Date()" with "Now()" and removed "Right"--and no longer get errors.

    What might be the cause of the problem?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    More often than not, that sort of error indicates you have a missing reference in your VBA project. You can check that by opening any module, or form that has code behind it, and doing Tools\References in the VBA editor. If you see something that says "MISSING - ..." that's the clue. Resolving a missing reference is usually a matter of locating the file on your system. Another possibility is that you have somehow created functions that are named Date and Right - but that seems rather remote.

    You should also be aware that using Now() rather than Date() will give you different results if the [stepdue] value is equal to the current date
    Wendell

  3. #3
    Lounger
    Join Date
    Sep 2008
    Location
    Virginia, USA
    Posts
    27
    Thanks
    2
    Thanked 0 Times in 0 Posts

    References seem OK

    I checked References, did not see anything MISSING. Could my workstation copy of Access be corrupt? Any other ideas I could pursue?
    Attached Files Attached Files

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    If you are able to, produce a cut down version of your database, compact it, then zip it and make it available here. We can then see if the database is wonky or not.

Posting Permissions

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