passing variables to sql string

K

Kylie

Hi there

I am trying to write a standard sql string using a WHERE
clause as follows:

"SELECT...FROM...WHERE name = '" & strVariable & "'"

however my strVariable is a coming from a name field
which sometimes has apostrophes in it. Any suggestions
on how I can stop the "'" s from breaking my code??

Thanks,
Kylie
 

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