Results 1 to 5 of 5
  1. #1
    Bruce is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    72

    Date() function undefined

    Using the Date() function as criteria for a query but when running the query the system responds with "Undefined Function 'Date' in expression".
    I have another database on the same PC where it does work. Strange.


    Any suggestions? tks!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    That's usually a reference problem:

    Access Reference Problems
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    you can also use format(now(), "Short Date") where "Short Date" is the name of any date format you want.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I would strongly recommend fixing the source of the problem, not working around it. If it's a reference problem, other functions will do the same thing.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    And if it isn't a reference problem, there are a couple of other possible options:

    1. Try a decompile. See here for how: http://www.granite.ab.ca/access/decompile.htm

    2. It sometimes is because of a field or object named Date ever existed in the database. If it doesn't exist there anymore, importing to a new database shell will sometimes cure it. If it does exist, then rename (making sure name autocorrect is turned off before doing the rename).

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

Similar Threads

  1. Date Function
    By joewhitt in forum Queries
    Replies: 7
    Last Post: 07-17-2011, 07:22 PM
  2. Julian Date Function Help Please
    By campanellisj in forum Programming
    Replies: 3
    Last Post: 05-13-2011, 12:59 PM
  3. Date Function
    By tmcrouse in forum Queries
    Replies: 2
    Last Post: 12-02-2010, 08:53 AM
  4. Undefined error importing spreadsheet
    By kbremner in forum Import/Export Data
    Replies: 1
    Last Post: 10-23-2010, 05:57 PM
  5. Date Past Function
    By Laney in forum Access
    Replies: 4
    Last Post: 05-21-2008, 07:19 AM

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