date() in query undefined

J

JeffG

Using Access 2007, I have a date function in a query condition, to filter on
a date field, as:

When I run the query, I get the following error: "Undefined function 'date'
in expression".

I just updated from Access 2003, and this worked when it was in that version.

I have also tried this as a new field in the query, but get the same error
message.

Any ideas?

Thanks.

Jeff
 
D

Douglas J. Steele

Sounds as though your References collection may have got messed up.
Unfortunately, I don't have Access 2007 installed on this machine, and I
don't remember how to get to the References off the top of my head. Assuming
you find it, check whether any of the selected references at the top of the
list have MISSING: in front of them.
 
A

Allen Browne

Firstly, notify Access 2007 that you trust the folder where you have your
database:
a.. Office Button (top left)
b.. Access Options (bottom of dialog)
c.. Trust Center (left)
d.. Trust Center Settings (button)
e.. Trusted Locations (left)
f.. Add new location (button)

After that, open the code window, and check your library references. For
details, see:
Solving Problems with Library References
at:
http://allenbrowne.com/ser-38.html

For further suggestions on solving issues that arise when changing to the
new version, see:
Converting to Access 2007
at:
http://allenbrowne.com/Access2007.html
 
B

boblarson

J

JeffG

I discovered an answer to this issue from a post while searching "Access
Database Queries". Bob Barrows (MVP) put a link to another site. I have
copied this solution below, because it worked...

Here are Doug Steele's instructions for how to do it:

****Quote****
Open any code module (or open the Immediate Window, using Ctrl-G, provided
you haven't selected the "keep debug window on top" option). Select Tools |
References from the menu bar. Examine all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in).

Just so you know: the problem will occur even if the library that contains
the specific function that's failing doesn't have a problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top