I have a customer name lookup field on my form.
It was created by the MS wizard. It works.
Except for any person with an apostrophe in their name like
O'Rorke or O'Malley. I get a debug error when I pick such a
lastname. Below is the present AfterUpdate code in the combo box.
Is there a way to fix this to allow an apostrophe last name??
thanks much. Cimoli.
Private Sub CboCusName_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[LastName] = '" & Me![cboCusName] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
It was created by the MS wizard. It works.
Except for any person with an apostrophe in their name like
O'Rorke or O'Malley. I get a debug error when I pick such a
lastname. Below is the present AfterUpdate code in the combo box.
Is there a way to fix this to allow an apostrophe last name??
thanks much. Cimoli.
Private Sub CboCusName_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[LastName] = '" & Me![cboCusName] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub