Data type mismatch in criteria expression even the datatype is the same

  • Thread starter Benjamins via AccessMonster.com
  • Start date
B

Benjamins via AccessMonster.com

Hi,

I have a query call ListRecur where it will Caculate the date when the entry
is going to recur

Below it the query Field information
DetId (FieldName same as table, Long Integer)
DetDate (FieldName same as table, Date/Time)
RecurDate (A expression Where it will add the DetDate by 7 days) Formula:
DateAdd('d',7,[DetDate])

This query works fine.

Later i try to add the criteria so that it will filter out any records that
is < Now() which i have been using for the rest of the other queries.
It give me an error saying that Data type mismatch in criteria expression

Is there any thing that i have done wrong that the system does not recongise
that the RecurDate is not a date format.
 
J

John W. Vinson

Later i try to add the criteria so that it will filter out any records that
is < Now() which i have been using for the rest of the other queries.
It give me an error saying that Data type mismatch in criteria expression

Is there any thing that i have done wrong that the system does not recongise
that the RecurDate is not a date format.

Please post the complete SQL of the query. It might be some other field
criterion.

Do note that Now() does NOT return today's date. It returns the current date
*and time*, accurate to microseconds (though only usable to the second). If
you're using < Now() as a criterion on a date field which contains only exact
dates, it may return unexpected results (e.g. because midnight at the start of
today is in fact less than Now(), you'll get today's records).
 

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