Unanswered: Need Help Constructing Time Query From A Text Box
I don't know why this is so painful but I am having problems with creating a query that takes two time input parameters from a form. The first parameter is the start time and the second parameter is the end time. The input coming from the text boxes is based on a 24 hour clock which has the following input mask 00:00. Below is a snippet of the code that I am using to query my database.
report.date >= [forms]![frmTrip_report]![txtStartDate] and
report.date <= [forms]![frmTrip_report]![txtFinishDate] and
report.time >=[forms]![frmTrip_report]![txtStartTime] and
Access handles date/time fields very nicely, so why not put your start date and time in ONE field, and same with end date and time?
Dim StartDateTime as Date
StartDateTime = txtStartDate + txtStartTime
Then in your query, Between StartDateTime and EndDateTime