I am not too sure what is the problem you experienced from your description
but to query for a certain date, you can use the criterion like:
.... WHERE [YourDateField] = #09/30/2005#
Notes:
====
1. Explicit date must be in the US format "mm/dd/yyyy" and enclosed in
hashes (#). You can also use the (unambiguous) format "yyyy-mm-dd" but
Access will convert it to the "mm/dd/yyyy" format.
2. If you have non-zero time component in [YourDateField], you need to
eliminate the time component using DateValue() like:
.... WHERE DateValue([YourDateField]) = #09/30/2005#
Alternatively, specify a range like:
.... WHERE ([YourDateField] >= #09/30/2005#)
And ([YourDateField] < #10/01/2005#)
The range looks a bit more complex but I think it is more efficient than
using DateValue() and hence my preference is the range rather than
DateValue(), certainly for Table with lots of Records and an index on the
date Field.
--
HTH
Van T. Dinh
MVP (Access)
alexasha said:
HI,
I would like to filter by query for certain date. I know how to use today
Date(), but I would like to be able to put any date. Date range might
work,
but it would require to input the same date twice. So far I was able to
find
an answer on this forum.
Thanks in advance