Hi All,
I have a form that uses combo box choices to populate the WHERE clause of an SQL string. For example:
If Not IsNull(chkAddressee) Then
strWHERE = strWHERE & " AND qryTableConsolidate.Addressee1 = " & cboAddressee
End If
When I execute this, I get Error 3075: missing operator in qryTableConsolidate.Company1 = Brendan Lee, where Brendan is the coice selected in cboaddressee. When I examine the SQL string I see :
SELECT qryTableConsolidate.* FROM qryTableConsolidate WHERE qryTableConsolidate.Addressee1=Brendan Lee
Am I missing quotes here around Brendan Lee? If so, what is the proper format for cboAddressee in the code above?
Thanks in advance.
I have a form that uses combo box choices to populate the WHERE clause of an SQL string. For example:
If Not IsNull(chkAddressee) Then
strWHERE = strWHERE & " AND qryTableConsolidate.Addressee1 = " & cboAddressee
End If
When I execute this, I get Error 3075: missing operator in qryTableConsolidate.Company1 = Brendan Lee, where Brendan is the coice selected in cboaddressee. When I examine the SQL string I see :
SELECT qryTableConsolidate.* FROM qryTableConsolidate WHERE qryTableConsolidate.Addressee1=Brendan Lee
Am I missing quotes here around Brendan Lee? If so, what is the proper format for cboAddressee in the code above?
Thanks in advance.