Quotation marks in a string.

S

SAC

I'm trying to write a sql statement using a recordset.

a string field in the recordset has the following content:

REV "D" DATED 03-07-00

another record has this:

REV 'C' DATED 08-14-86

So I've got quotation marks in some and apostrophe's in others.

Currently the part of the SQL statement that I'm having problems with looks
like this:

....

& "TWDESN.[SNDESC] = """ & Trim(rstmp!SNDESC) & """;"

I've tried putting extra quotes around it but then it prompts for the value
of the field.

Any ideas?

Thanks.
 
S

SAC

Thanks! That worked very well.
Roger Carlson said:
You might take a look at this sample database:
http://www.rogersaccesslibrary.com/Otherdownload.asp?SampleName='FixMixedQuotes.mdb'


--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


SAC said:
I'm trying to write a sql statement using a recordset.

a string field in the recordset has the following content:

REV "D" DATED 03-07-00

another record has this:

REV 'C' DATED 08-14-86

So I've got quotation marks in some and apostrophe's in others.

Currently the part of the SQL statement that I'm having problems with looks
like this:

...

& "TWDESN.[SNDESC] = """ & Trim(rstmp!SNDESC) & """;"

I've tried putting extra quotes around it but then it prompts for the value
of the field.

Any ideas?

Thanks.
 

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