Quotation marks

G

Guest

Hi Everyone,

I seem to have come across a problem when transfering data from my VB
Questionairre application to an Access database.
The application is set up so that users go through answering multiple choice
questions and a comments box. When the submit button is clicked, the data is
copied into Access using 'Insert, Value' SQL commands.
Now the problem I have is that if a user types in "The "Dog" had a bone"
then I receive Error: -2147217900.

I would be very grateful if I could get some help.

Thank you
 
S

Sylvain Lafontaine

Use the Replace function to double embedded quotes so that "The "Dog" had a
bone" becomes "The ""Dog"" had a bone":

s = Replace (s, """", """""")
 
G

Guest

Thank you so much for your help.

Im 19 and really just slowly working my way up in this field.
And it just shows that these small problems can be the most difficult and
keep one thinking for ages.

But thanks again.
 

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