hi Doyce,
"[COMNAM_08] ='" & Replace( strComboVar, "'", "''") & "'"
have an awesome day,crystal
Pros,
I have a combo box that looks up Vendors by vendor name. I just observed that if the Vendor name has an apostrophe in it like "Page's Upholstery", the after update event of the combo box errors. What can I do to fix that? Here is the code:
Dim RS As DAO.Recordset
Dim strComboVar As StringstrComboVar = Me.cboVendor
If Len(cboVendor & vbNullString) <> 0 Then
Me.Filter = ""
Me.FilterOn = False
Set RS = Me.Recordset
RS.FindFirst "[COMNAM_08] ='" & strComboVar & "'"
If Not RS.NoMatch Then Me.Bookmark = RS.Bookmark
Set RS = Nothing
End If
Doyce
Posted by: crystal 8 <strive4peace2008@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar