• Data type mismatch with time values

    • This topic has 0 replies, 1 voice, and was last updated 7 years ago.
    Author
    Topic
    #1773352

    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?

    Reply To: Data type mismatch with time values

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: