T
Terrence Carroll
I am getting a run time error 3077 whenever I select a record from the
combobox with an apostophe as part of the text in the combo box. Can anyone
tell me what the apostrophes do in the code below and if there is a good
error handling feature to prevent this so I can have company names with
apostrphes in the combo box without getting the run time error? Listed below
is the code:
Private Sub CboCompanyLookup_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Client Name] = '" & Me![CboCompanyLookup] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Thanks,
Terry Carroll
combobox with an apostophe as part of the text in the combo box. Can anyone
tell me what the apostrophes do in the code below and if there is a good
error handling feature to prevent this so I can have company names with
apostrphes in the combo box without getting the run time error? Listed below
is the code:
Private Sub CboCompanyLookup_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Client Name] = '" & Me![CboCompanyLookup] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Thanks,
Terry Carroll