I'm building sql on the fly based on user input. Everything works except this one that selects between two dates. I get the error: "Data type mismatch in criteria expression" at the line: rs.Open sql
This is the sql statement:
SELECT * FROM WOINFO WHERE (ConstDate BETWEEN "#4/1/2002#" AND "#4/30/2002#")
I tried doing this with a variable because the field ConstDate is a Date field in the DB:
SELECT * FROM WOINFO WHERE (ConstDate BETWEEN "#CDate(strCONDATE)#" AND "#CDate(strCONDATE2)#")
But I still get type mismatch.
If anyone spots something wrong with this any help is appreciated.
JO




Reply With Quote