setting criteria for time value search in select queries

  • Thread starter Thread starter RobV
  • Start date Start date
R

RobV

I want to run a select query to look for entries made in a specific time
range. I did it before in previous databases using this criteria
Between#12:00:00PM# and #5:00:00PM#. When I try it in my present database I
get no records returned.

If I run the select query with no criteria I see the records I want plus
those outside of the time range. In the select query the time is displayed
as 4:52PM for example. The format in the underlying table is set to Medium
Time with a default setting of Now() as I need to record the actual time of
the entry.

Any suggestions?
 
If the value was inserted with Now(), it contains a date as well as a time
value. You suppress the dispplay of the date by setting the Format property
to Short Time, Medium Time, etc, but the date is still there and so the
query does not match the records.

If the field is named Field1, try typing this in the Field row in query
design:
TimeValue([Field1])
Then try your criteria under that.
 
Back
Top