Quotation marks in a string.

  • Thread starter Thread starter SAC
  • Start date Start date
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.
 
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.
 
Back
Top