Date parameter causes select query to fail

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a simple select query on a simple table with a time/date field.
Any select query using explicit (#4/14/04#) or function (Date())
criteria returns no records, even though there are several matching
records in the table. I have tried specifying different date formats
in both the criteria and the table with no success. The query works
fine if no parameters, or other (non-date) parameters, are specified.

Does anybody have any suggestions?

Thanks
Dave
 
I have a simple select query on a simple table with a time/date field.
Any select query using explicit (#4/14/04#) or function (Date())
criteria returns no records, even though there are several matching
records in the table. I have tried specifying different date formats
in both the criteria and the table with no success. The query works
fine if no parameters, or other (non-date) parameters, are specified.

Does anybody have any suggestions?

Thanks
Dave

If the records contain a Time value along with the Date value, unless
you span the time period, you will not get any records, as #4/14/04#
00:00:00 AM is not the same as #4/14/04# 08:30:55 AM.

If you still have difficulty, post the actual SQL.
 
Fred -

Your suggestion did the trick - the date fields use General Date
format, and my query wasn't.

Thanks
Dave
 
Back
Top