Problem with Date() function

Timberwolf

Registered User.
Local time
Today, 23:11
Joined
Dec 15, 2000
Messages
33
I have a date field in my query and I'd like it to return records with today's date. I used "Date()" as the only criterion, but when I run the query, I get an error message: "Undefined function 'Date' in expression." Any suggestions? Thanks!
 
Timberwolf said:
I have a date field in my query and I'd like it to return records with today's date. I used "Date()" as the only criterion, but when I run the query, I get an error message: "Undefined function 'Date' in expression." Any suggestions? Thanks!

It should be just

Date()
 
I would think that if you were to use "Date()" (in quotations) the query would consider it to be a string and give you a data type mismatch error. Have you tried using the date function lately in any other applications?

You could be missing a reference in VBA. Just for kicks, design a new form and simply add an unbound text box with =Date() as the control source. If you get the same error, go into the VBA code window and check Tools >> References for a missing reference.
 
Just to clarify, I didn't use the quotation marks in the criterion. I'll try the unbound text box suggestion. THANKS!
 
When standard functions such as Date() don't seem to work, you have a broken reference. Search here for missing references if you don't know what I'm talking about.
 

Users who are viewing this thread

Back
Top Bottom