S
shank
I have a combo box on a form to find the company I'd like to display on that
form for editing. The problem is when the company has an apostrophe in the
name. It causes a script error. What edits are needed on the below code to
make the combo box work with apostrophes?
Private Sub Combo62_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Company] = '" & Me![Combo62] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
thanks!
form for editing. The problem is when the company has an apostrophe in the
name. It causes a script error. What edits are needed on the below code to
make the combo box work with apostrophes?
Private Sub Combo62_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Company] = '" & Me![Combo62] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
thanks!