I have a combo box on my form and when I select a record from it (employee name) it goes to matching record in subform. However, i get an error when i select an employee name with an apostrophe in it.
Syntax error, missing operator in expression.
Here is my code..it works fine with all the other names.
Dim rs As Object
Set rs = Me.Recordset.Clone
With rs
.FindFirst "[Employee_Name] = '" & Me![cboEmployeeName] & "'"
If Not .EOF Then Me.Bookmark = .Bookmark
End With
Syntax error, missing operator in expression.
Here is my code..it works fine with all the other names.
Dim rs As Object
Set rs = Me.Recordset.Clone
With rs
.FindFirst "[Employee_Name] = '" & Me![cboEmployeeName] & "'"
If Not .EOF Then Me.Bookmark = .Bookmark
End With