I have a library program for books. Some book titles have an apostrophe in them, example: Christy’s Choice.
One lookup in a form uses a ComboBox to list the titles. Whenever a title with apostrophe is selected in the combo box list,
an error box comes up “Runtime-error 3077 Syntax error (missing operator) in expression.
Debug displays with the rs.FindFirst line highlighted yellow:
Private Sub Combo63_AfterUpdate() ' Find the record that matches the control. Dim rs As Object Set rs = Me.Recordset.Clone rs.FindFirst "[title] = '" & Me![Combo63] & "'" If Not rs.EOF Then Me.Bookmark = rs.Bookmark End Sub
All other title selections work correctly and display the book details in the form.
Is there an addition to rs.FindFirst line to accept the apostrophe?