hello,
I am using a combo box to select data on a form but if the value has a ' in it, then the code fails saying missing operator.
how can I get round this ?
Private Sub Combo82_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Name] = '" & Me![Combo82] & "'"
Me.Bookmark = rs.Bookmark
End Sub
is the code.
thanks for your help.
I am using a combo box to select data on a form but if the value has a ' in it, then the code fails saying missing operator.
how can I get round this ?
Private Sub Combo82_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Name] = '" & Me![Combo82] & "'"
Me.Bookmark = rs.Bookmark
End Sub
is the code.
thanks for your help.