troubleshooting Question

Syntax issue with not in list code

Avatar of SteveL13
SteveL13Flag for United States of America asked on
Microsoft Access
3 Comments1 Solution70 ViewsLast Modified:
I'm having an issues when I try to add a string of characters that includes an apostrophe.  Here is the string...
SAM's (Somewhere, IL 61108 - UPS Ground)

It works fine without the apostrophe.

and here is the not in list code:

strSQL = "INSERT INTO tbSamplesTypesLU ([Description],[CustomerID]) VALUES ('" & NewData & "'," & Me.Parent.cboCustomerID & ");"

Can someone spot my problem?
ASKER CERTIFIED SOLUTION
aikimark
Get vaccinated; Social distance; Wear a mask
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros