Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2008
    Posts
    1

    Unhappy Access 2003 Date() Function returns "#Name?"


    Hi, we use MS-Access only for one old program made in Access 2000. We are now using it in MS-Access 2003 in a Citrix environmnent compose of 8 servers. From my point of view all these servers are the same (installed in the same way with same content). On the three servers that have been installed first, the Date() function used in the program returns the correct value like DD/MM/YYYY, but on all the others servers the Date() function returns "#Name?". We have been able to live with the problem until now. I have to fix this and I have searched the net without success. Of course I have covered the Regional Settings and OS Date format usual stuff.

    Anybody can help me understand the Date() function and on what it relies to return a value ? I am not even a programmer, but a network admin who needs to correct what seems to be a bad setting or something missing on our latest servers.
    Thanks a lot for any help you can provide.

    Sylvio Martel

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It sounds like you might have a Reference issue.
    http://www.accessmvp.com/djsteele/Ac...nceErrors.html

  3. #3
    Helen's Avatar
    Helen is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2009
    Location
    The Hill, Australia
    Posts
    28
    I have virtually the same problem. On my computer, a form opens with a date field in a new record, the default value for which is Date().

    I sent an ACCDE version of the file to someone in the US (I'm in Autralia) - might be relevant given different date conventions.

    When the form opens, she gets this message:
    Function is not available in expressions in query expression 'Date('
    and she gets #Name? in the text box.

    When she uses the little calandar to enter a date, she initially gets this message:

    Function is not available in expressions in table-level validation expression.

    When she clicks ok on that, and tries the little calendar again, it works.
    She sent her file back to me and no such problems at my end at all.

    Given the previous post, I went to Visual Basic, opened Tools, References, and these have a tick next to them, the rest don't:

    Visual Basic for Applications
    Microsoft 12.0 Object Library
    OLE automation
    Microsoft ActiveX Objects 2.1 Library
    Microsoft Office XP Web components
    VSDataIO OLE Control Module
    Microsoft Visual Basic for Applications Extensibility 5.3

    I'm relatively new to Access but have written some code in Visual Basic rather than relying on queries and macros.

    Please help!!!

  4. #4
    Helen's Avatar
    Helen is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2009
    Location
    The Hill, Australia
    Posts
    28
    This is for anyone searching about the same problem.
    My file is to be shared on the net with people in different countries, so attending to individual computers isn't an option.

    Adding in fancy thiings like the reference wizard was a bit beyond me.

    I found my own solution. The Now() function still works perfectly, so I could use that, but when comparing dates like
    EnteredDate = Date() gives YES, but using Now() as
    EnteredDate = Now() gives NO if the time component of Now() isn't midnight, which is the default time when JUST a data is entered, so that buggered that!

    SOLUTION: Int(Now()) is effectively exactly the same as Date()
    and Now() DOES work on the other computers. The interger part of
    Now() is just the date part. The decimal part is just the time.

    I tried CVDate(Now()) and it didn't do the job when doing the abovmentioned comparison. Hope this helps someone else wrestling with referencing issues and it's a bit beyond them, as it was for me.

  5. #5
    paul_oneill is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2011
    Posts
    1

    Solved??

    Hey guys

    Had the same problem and found anothe rpost that suggested looking for a reference that was missing - there's was Microsoft Word.

    I didn't have anything missing but by removing the reference to Word and re-adding it, everything started to work.

    I suspect it is just that the references needed refreshing...

  6. #6
    Guillem is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2012
    Posts
    1

    It is the best workaround

    I have not found a consistent and stable solution for this #Name? problem working with References. Sometimes OK, sometimes mysteriously come back with the #Name?.

    This patch you suggested always as worked OK. Thanks Helen!

    Guillem

    Quote Originally Posted by Helen View Post
    This is for anyone searching about the same problem.
    My file is to be shared on the net with people in different countries, so attending to individual computers isn't an option.

    Adding in fancy things like the reference wizard was a bit beyond me.

    I found my own solution. The Now() function still works perfectly, so I could use that, but when comparing dates like
    EnteredDate = Date() gives YES, but using Now() as
    EnteredDate = Now() gives NO if the time component of Now() isn't midnight, which is the default time when JUST a data is entered, so that buggered that!

    SOLUTION: Int(Now()) is effectively exactly the same as Date()
    and Now() DOES work on the other computers. The interger part of
    Now() is just the date part. The decimal part is just the time.

    I tried CVDate(Now()) and it didn't do the job when doing the abovmentioned comparison. Hope this helps someone else wrestling with referencing issues and it's a bit beyond them, as it was for me.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 09-25-2008, 12:19 PM
  2. Replies: 1
    Last Post: 09-05-2008, 12:07 PM
  3. Replies: 2
    Last Post: 08-31-2006, 12:19 PM
  4. "Count" and "Countif" in Reports
    By JMantei in forum Reports
    Replies: 1
    Last Post: 06-20-2006, 02:20 PM
  5. Access Date/Time....I need a "generic" date.
    By beastmaster in forum Access
    Replies: 2
    Last Post: 12-29-2005, 12:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums