how to specify a search criteria

J

Jennifer P

I have month long log that has hundreds of entries logged. I have the form
auto generate the time and date the record is entered using general time. Is
it possible to set up a search criteria to search the entire month but only
display records between the times of 23:00 till 07:00? How would be the best
way to establish this query?

Thank You in Advance Jen
 
T

TomHinkle

The datestamp for all intensive purposes is a double precision number.

In the query, for readability, you can make a time only field..

so to get the time by itself, simply subtract the day portion..

Datestamp - Clng(Datestamp)

The fractional part of the number represents the time..
that is
6 am is xxx.25
12 pm is xxx.5
3 pm is xxx.625

etc..

for criteria, figure out percentages for 7:00 and 23:00
and put those in a [between ] in the criteria section.
 
M

Marshall Barton

Jennifer said:
I have month long log that has hundreds of entries logged. I have the form
auto generate the time and date the record is entered using general time. Is
it possible to set up a search criteria to search the entire month but only
display records between the times of 23:00 till 07:00? How would be the best
way to establish this query?


Create a calculated field in the query:
TOD: TimeValue(thedatefield)
and set its criteria to:
 
Top