Crystal,
That's perfect! Thank you!!
Doyce
---In MS_Access_Professionals@yahoogroups.com, <strive4peace2008@...> wrote :
hi Doyce,
"[COMNAM_08] ='" & Replace( strComboVar, "'", "''") & "'"
have an awesome day,crystal
On 9/6/17 3:18 PM, winberry.doyce@... [MS_Access_Professionals] wrote:
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: winberry.doyce@con-way.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar