S
S Jackson
I am attempting to write this statement:
strSQL = "Select tblSurveyors.SvyFirstName, tblSurveyors.SvyLastName, " _
& "tblSurveyors.SvyCity, tblSurveyors.Region, tblSurveyors.SvyTitle " _
& "FROM tblSurveyors " _
& "WHERE tblSurveyors.Region = " & Me.Region & " " _
& "AND WHERE tblSurveyors.SvyTitle LIKE Program*" _
& "ORDER BY tblSurveyors.svyLastName;"
Me.cmbFieldOfc.RowSource = strSQL
MsgBox strSQL
When I test this, I get this error when clicking on the cmbFieldOfc combo
box:
Syntax error (missing operator) in query expression "tblSurveyors.Region =
10 AND WHERE tblSurveyors.SvyTitle LIKE Program*'.
I figure it has to be the strSQL statement in the Like expression, but I've
been testing different things, and I am not having much luck. I can never
remember when to use single or double quotes. I tried this:
& "AND WHERE tblSurveyors.SvyTitle LIKE " & "'" & "Program*" & "'" _
But I still get the missing operator error.
TIA
S. Jackson
strSQL = "Select tblSurveyors.SvyFirstName, tblSurveyors.SvyLastName, " _
& "tblSurveyors.SvyCity, tblSurveyors.Region, tblSurveyors.SvyTitle " _
& "FROM tblSurveyors " _
& "WHERE tblSurveyors.Region = " & Me.Region & " " _
& "AND WHERE tblSurveyors.SvyTitle LIKE Program*" _
& "ORDER BY tblSurveyors.svyLastName;"
Me.cmbFieldOfc.RowSource = strSQL
MsgBox strSQL
When I test this, I get this error when clicking on the cmbFieldOfc combo
box:
Syntax error (missing operator) in query expression "tblSurveyors.Region =
10 AND WHERE tblSurveyors.SvyTitle LIKE Program*'.
I figure it has to be the strSQL statement in the Like expression, but I've
been testing different things, and I am not having much luck. I can never
remember when to use single or double quotes. I tried this:
& "AND WHERE tblSurveyors.SvyTitle LIKE " & "'" & "Program*" & "'" _
But I still get the missing operator error.
TIA
S. Jackson