Date()

J

JudithJubilee

Hello there,

I am trying to create a query that gives me all the courses that have run
Today. I have entered the criteria =Date() into the relevant row and it is
telling me that my formula is too complicated. I have also tried Date().

I am using 97 at the moment. Is this the reason, as it does not happen in
other versions and I have tried it on another 97 machine and the same problem
occurs.

Any help will be gratefully received.

Judith
 
O

Ofer

Do you have only one table in the query, or few joined together?
If you have few tables, that might cause the error, try and remove each
table to see which join cause the problem

Do you store the date in the table including the time or just the date, if
the field include the time, your criteria will return no records,
In that case change the query to

WHERE Format([DateFieldName],"dd/mm/yyyy")=Date()
 
J

John Vinson

Hello there,

I am trying to create a query that gives me all the courses that have run
Today. I have entered the criteria =Date() into the relevant row and it is
telling me that my formula is too complicated. I have also tried Date().

You are putting this on the Criteria line of the grid, right?
I am using 97 at the moment. Is this the reason, as it does not happen in
other versions and I have tried it on another 97 machine and the same problem
occurs.

Any help will be gratefully received.

Judith

One possibility is that you might have a missing reference.
Open any module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.

If that's not the case, please post the SQL view of the query.

John W. Vinson[MVP]
 
Top