Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date/Time limiting in a report.

Status
Not open for further replies.

Roosters

Technical User
May 14, 2000
61
AU
In a table I have a 'Time_Out' field. This field has a date/time entry "01/01/01 16:00:00". I need to limit a report between two dates (which I have done) but also display only times between 'start_time' and 'end_time" within this data range. I have a user form to get the date range and propose to use the same form to enter the time range.

The query criteria for 'Time_Out' is
>=[forms]![staff]![start] And <=[forms]![staff]![end]

the time fields on my user form are [time_start] and [time_end]

Hope this makes sense!
Thanks Phil.

 
If you mean, for instance, you need only records between 8 am and 5 pm for each day in your range, create a field in your query with the time part of the date, and in the same criteria row for that field put between [Start time] and [End time].

If you mean between Start time on Start date and End time on End Date, you just need to enter the time as well as the date in your form fields.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top