Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Double quotes in SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-09-28 : 00:52:00
Jenny writes "I have seen so many articles on replacing the apostrophe with two apostrophes in order to insert form field data such as the name O'Reilly. What about when the user enters double quotes in a form field? For example: in a form field named comments, a user enters: I am just "great" today!

I am trying to insert this form field into an Access 97 database, and what I get is:
I am just
INSTEAD OF
I am just "great" today!

How can you replace double quotes? I tried using the Replace(myFormField,chr(34),"something else") and it does not work. Any suggestions on what to do if the user enters "" in a form field?
Grateful Jenny"

KnooKie
Aged Yak Warrior

623 Posts

Posted - 2002-04-12 : 07:31:07
comments = "I am just " & chr(34) & "great" & chr(34) & " today!"


chr(34) = "

Paul
Go to Top of Page
   

- Advertisement -