setting criteria for time value search in select queries

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?
 
A

Allen Browne

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.
 

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