Why do I get "unknown function 'date'"

G

Guest

I am running Microsoft Office Access 2003(11.6566.6568). I had created a
table with a field having validation "Not >Date()". This was working well
but now when I try to use the same function elsewhere, or even access the
original table I get a message "Unknown function 'Date' in validation
expression or default value in Table.Field Name". Access still however lets
me pull in the built in function Date.
Any ideas how to cure this or what might have happened.
 
D

Douglas J Steele

Two common reasons.

First is that you're using the word Date somewhere in your application for
your own purposes: the name of the field in a table, the name of a variable,
the name of a function, etc. Date is a reserved word, and shouldn't be used
for your own purposes.

Second is that you've got a problem with your References collection. Like
virtually every other Windows application, Access makes use of external
references to provide additional common functionality. There are a number of
circumastances that can lead to the References collection getting corrupted
(installing new software that replaces one or more of the existing
references, moving the application to another workstation where the
references are a different version or do not exist, etc.)

Open any code module, then 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!)
 

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