V
Viper
Hello i can't get the correct form for a date as a constraint in SQL
here is my code
Search3 is a date that pulls from another text box... it pulls fine
When i run this code with search2 as the only constraint it runs fine
Set rst2 = db.OpenRecordset("SELECT * FROM " & "tbl_audits scheduled
WHERE [Rep] = '" & search2 & "'" And [Date] = #"& search3 &#")
I am having problems with:
#"& search3 &#"
Search3 This is a Date 11/21/2006
It says compile error
Expected: Expression
I think it is a problem with the way i have the #"&
here is my code
Search3 is a date that pulls from another text box... it pulls fine
When i run this code with search2 as the only constraint it runs fine
Set rst2 = db.OpenRecordset("SELECT * FROM " & "tbl_audits scheduled
WHERE [Rep] = '" & search2 & "'" And [Date] = #"& search3 &#")
I am having problems with:
#"& search3 &#"
Search3 This is a Date 11/21/2006
It says compile error
Expected: Expression
I think it is a problem with the way i have the #"&