Contatenate quote character

  • Thread starter Thread starter EllenM
  • Start date Start date
E

EllenM

Hello,
Using an update query, I'd like to concatenate a field named [link], so that
the end result looks like this:
<a href="[link]">.

Looks like the quote character needs some sort of escape character.

Thanks in advance for your help,
Ellen
 
You can concatenate in Chr(34) or you can use two quotes in a row whereever
you need one quote in the actual string. Any one of the following should work.

SomeString = "<a href=""[link]"">"

or
SomeString = "<a href="& Chr(34) & "[link]" & Chr(34) & ">"

or (this one uses two quotes to get one quote inside a begin string quote and
an end of string quote)
SomeString = "<a href="& """" & "[link]" & """" & ">"



John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
-- only need to omit the quotes around the field name:
SomeString = "<a href="& Chr(34) & [link] & Chr(34) & ">"
or
SomeString = "<a href="& """" & [link] & """" & ">"
works.

Thanks so much, John.
 
Back
Top