M
maura
I have a combo box so that I can look up a company's name.
Some of these companies have apostrophes, ie: Bill's
Transport; PK's Auto Transport. When I use the combo box
to find these companies I get an error: Run time error
3077 Syntax error (missing operator) in expression. The
other companies without ', come up fine. What am I missing?
Thanks, Maura.
Private Sub Combo30_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[TransportCompany] = '" & Me![Combo30]
& "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Form_Current()
Combo30.Value = Me.TransportCompany
End Sub
Some of these companies have apostrophes, ie: Bill's
Transport; PK's Auto Transport. When I use the combo box
to find these companies I get an error: Run time error
3077 Syntax error (missing operator) in expression. The
other companies without ', come up fine. What am I missing?
Thanks, Maura.
Private Sub Combo30_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[TransportCompany] = '" & Me![Combo30]
& "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Form_Current()
Combo30.Value = Me.TransportCompany
End Sub