ms access vba strip single quote from string

using this:

strSubj = DLookup("ActionLogAssignmentChangeEmailSubject", "tblEmailSettings", "SettingsID = 1") & Me.Call & " - " & Me.Customer & " - Closed: " & Me.Closed

me.customer may occasionally contain a single quote '

(IE, "Our Company Name's")

What's the best way to tackle this?
LVL 2
RossAsked:
Who is Participating?
 
mbizupCommented:
You can use the replace function:

strSubj = DLookup("ActionLogAssignmentChangeEmailSubject", "tblEmailSettings", "SettingsID = 1") & Me.Call & " - " & Replace( Me.Customer,"'","")  & " - Closed: " & Me.Closed
0
 
RossAuthor Commented:
perfect - I didn't know it would be as simple as to be able to do it inline like that. Thanks!
0
 
mbizupCommented:
Glad to help :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.