filtering dates in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

due to a jet engine error (80004005)i have changed the date format in my db
from short date to medium, however, when i run a query the criteria (Now())
or <(now()) produces a data type mismatch error...please how do i fix
this?....
 
due to a jet engine error (80004005)i have changed the date format in my db
from short date to medium, however, when i run a query the criteria (Now())
or <(now()) produces a data type mismatch error...please how do i fix
this?....

The *format* of the date/time field shouldn't have any effect; a
date/time is stored as a number regardless of the format (and you can
even have the same field displayed with many different formats if you
wish). The error is somewhere else!

Try a couple of things:
First, use Tools... Database Utilities... Compact and Repair. Your
database may still be corrupted.

Then, type Ctrl-G to bring up the Debug window. In the "Immediate"
window type

?Now

and then on the next line

?Date

Do you see the current date and time after Now, and the current date
after Date?

Then please post the SQL view of the query.

John W. Vinson[MVP]
 
Sorry for the delay in reply. In the end decided to scrap the db...the
security on that system is very low, and i beleive some 'threats' corrupted
the whole thing....
So have started again.
 
Back
Top