G
Guest
Hello
I am using the code supplied by the combo box wizard to go to a specific
record based on the selection in the combo box. Code is as follows:
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
'remove
rs.FindFirst "[Title] = ' " & Me![Combo66] & " ' "
Me.Bookmark = rs.Bookmark
Problem is that some of the values in the combo box contain apostrophes,
i.e. the "I'm" in "When I'm Sixty Four"
This seems to make the code crash every time, whereas other titles which
dont have apostrophes work fine.
Anyone know a way round this?
Thanks
I am using the code supplied by the combo box wizard to go to a specific
record based on the selection in the combo box. Code is as follows:
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
'remove
rs.FindFirst "[Title] = ' " & Me![Combo66] & " ' "
Me.Bookmark = rs.Bookmark
Problem is that some of the values in the combo box contain apostrophes,
i.e. the "I'm" in "When I'm Sixty Four"
This seems to make the code crash every time, whereas other titles which
dont have apostrophes work fine.
Anyone know a way round this?
Thanks