Guest_imported
New member
- Jan 1, 1970
- 0
- 0
- 0
I'm using the following code to find a record on my form based on what the user selects from the drop down box.
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Idkey]= '" & Me![cboSearch] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
When a type a last name like "Smith" it works fine, but when a type a name like "O'conner" i get a run-time error 3077 - Syntax error missing operator in expresssion. It's obvoiusly the hyphen in the name that's causing the problem. What type of change does my code need? I've played around and just can't get it to work.
Thanks
MD
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Idkey]= '" & Me![cboSearch] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
When a type a last name like "Smith" it works fine, but when a type a name like "O'conner" i get a run-time error 3077 - Syntax error missing operator in expresssion. It's obvoiusly the hyphen in the name that's causing the problem. What type of change does my code need? I've played around and just can't get it to work.
Thanks
MD