BrockLanders
Programmer
I have a combo box on a form that finds a record on a subform. The source of the combo box is a text field in a query. The code for the event was created by Access' combo box wizard. It works fine unless there's a ' in the value of the field, for example, 2' waves. I'll get a syntax error. However, if I remove the ' so the value is 2 waves, it works fine. Here is my code:
The error is stopping at the line Me.RecordsetClone...... so I'm guessing it is the "[Program] = '" & Me![Combo22] & "'" portion.
Any ideas how to get the code to lookup values with or without a '
Thanks in advance for any help!
Code:
Sub Combo22_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Program] = '" & Me![Combo22] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Any ideas how to get the code to lookup values with or without a '
Thanks in advance for any help!