Dealing with Apostrophes in my data -- Access 2007 VBA

L

LA Lawyer

I have some programming that includes using a contact's name which sometimes
includes an apostrophe, like O'Keefe, O'Reilly, etc. This is causing me
grief when it crashes otherwise perfect coding.

How can I deal with this issue?
 
F

fredg

I have some programming that includes using a contact's name which sometimes
includes an apostrophe, like O'Keefe, O'Reilly, etc. This is causing me
grief when it crashes otherwise perfect coding.

How can I deal with this issue?

The usual fix is to use """" instead of "'".
How about posting the current code that is causing the error so we can
work with what you're using.
 
J

John W. Vinson

I have some programming that includes using a contact's name which sometimes
includes an apostrophe, like O'Keefe, O'Reilly, etc. This is causing me
grief when it crashes otherwise perfect coding.

How can I deal with this issue?

Either use " to delimit your text strings and criteria, or double up the
apostrophe. It might help if you would post the relevant part of your code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top