need Help with multiple sql criteria

Rand

Registered User.
Local time
Yesterday, 20:30
Joined
Jul 28, 2013
Messages
17
combo 86 is text and i keep getting an error see attached image
the numbers are date serial numbers. it works if i dont use the combo86 clause
the syntax is as follows:
strSQL = "SELECT Qry_CalDataBS.dte,Qry_CalDataBS.bs "
strSQL = strSQL & "FROM Qry_CalDataBS "
strSQL = strSQL & "WHERE Qry_CalDataBS.bs = '" & Me.[Combo86] & "' "
strSQL = strSQL & "WHERE (Qry_CalDataBS.dte) Between " & lngFirstOfMonth & " And " & lngLastOfMonth & " ORDER BY "
strSQL = strSQL & "Qry_CalDataBS.dte;"

it is from a populated calendar i got somewhere and trying to modifyy it to show just certain records based on the combo 86 dropdown.
tnx
 

Attachments

  • Capture.JPG
    Capture.JPG
    22.6 KB · Views: 100
You can only have one WHERE clause, but it can have multiple criteria separated by AND or OR.
 

Users who are viewing this thread

Back
Top Bottom