Dear experts -
I'm getting an error on the following part of a query:
I build a string that include a 'between two dates' component:
strsql = strsql & " AND (" & "datevalue(expdate) between #" & Me.txtdatefrom & "# AND #" & Me.txtdateto & "#)"
expdate is a datetime field.
The reason I'm trying to use it, is that I want to grab all records where that date - regardless of the time - falls between the two specified dates.
The error I'm getting - definitely attributable to this line - is:
DATA TYPE MISMATCH IN CRITERIA EXPRESSION.