This one gives me the error "data mismatch in criteria expression"
This one does not
This leads me to believe that the dates need to be strings. However, when I do this, (or remove the single quotes) the statement returns no records.
What is wrong with the first statement that I am not seeing?
Code:
strSQL = "SELECT * FROM tblSched WHERE (APPROVED=0) AND (sDate BETWEEN '" & dteDate & "' AND '" & dteDate2 & "')"
Code:
strSQL = "SELECT * FROM tblSched WHERE (sdate BETWEEN '" & strTemp & "' AND '" & DateAdd("d", -1, DateAdd("m", 1, strTemp)) & "')"
This leads me to believe that the dates need to be strings. However, when I do this, (or remove the single quotes) the statement returns no records.
What is wrong with the first statement that I am not seeing?