I have an Access 2010 database with a query that includes three fields that get the time part from some Date/Time fields, like this.
Time1: TimeValue([MinTime])
Time2: TimeValue([MaxTime])
Time3: TimeValue([EventTime])
This works fine and extracts the time values with the format hh:mm:ss.
I want to find records where Time3 is between Time1 and Time 2, and I have another query, based on the above query, that includes the [Time3] field with the criterion “Between [Time1] And [Time2]”, but I get the error “Data mismatch in criteria expression”. All of the time values are between 00:00:00 and 23:59:59, and there are no nulls. How can I prevent this error?