Names with apostrophe

I have created a user Log that is working perfectly, however, one of our staff is not appearing on the log. His name is Noel D'Arcy. It would appear that the apostrophe is causing the issue.

I am using using User Level Security and the name is being picked up using CurrentUser().

Is there a way round this?

Many Thanks
SparkyPAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Commented:
wrapped the variable with chr(34) instead of single (') quote

user= " & chr(34) & currentUser & chr(34) & "
0
 
SparkyPAuthor Commented:
Capricorn

Thanks
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.