Make URLs

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

EllenM

Hello,
I'd like to make urls by concatenating three fields. The urls will look like
this:
<a href='[!--$ssLink("ucm194578.htm#_Toc230422666")--]'>Introduction</a>


I think it should constructed like this:
Link: "<a href='[!--$ssLink(""ucm" & [UCM] & ".htm#_" &
[tr]&"")--]'>"&[Field12]&"</a>", except that I get an error message that
there's too many closing parentheses.

Thanks in advance for your help.

Ellen
 
EllenM said:
Hello,
I'd like to make urls by concatenating three fields. The urls will
look like this:
<a
href='[!--$ssLink("ucm194578.htm#_Toc230422666")--]'>Introduction</a>


I think it should constructed like this:
Link: "<a href='[!--$ssLink(""ucm" & [UCM] & ".htm#_" &
[tr]&"")--]'>"&[Field12]&"</a>", except that I get an error message
that there's too many closing parentheses.

Is this a message from Access? Or from the application that's rendering
these anchor tags?
 
EllenM said:
Hello,
I'd like to make urls by concatenating three fields. The urls will
look like this:
<a
href='[!--$ssLink("ucm194578.htm#_Toc230422666")--]'>Introduction</a>


I think it should constructed like this:
Link: "<a href='[!--$ssLink(""ucm" & [UCM] & ".htm#_" &
[tr]&"")--]'>"&[Field12]&"</a>", except that I get an error message
that there's too many closing parentheses.

Thanks in advance for your help.

Ellen

The problem is you failed to excape the literal quote before the closing
parenthesis. Unless you escape the quote, Jet treats it as a delimiter.
You escape a special character by doubling it. The expression should
look like this:

Link: "<a href='[!--$ssLink(""ucm" & [UCM] & ".htm#_" &
[tr] & """)--]'>"&[Field12]&"</a>",

PS. It helps readability to put spaces around your operators
(specifically the ampersands)
 
Thanks, Bob. Looks like you tripled the quotes before the closing
parenthesis. But it worked and for that I'm grateful.

Ellen

Bob Barrows said:
EllenM said:
Hello,
I'd like to make urls by concatenating three fields. The urls will
look like this:
<a
href='[!--$ssLink("ucm194578.htm#_Toc230422666")--]'>Introduction</a>


I think it should constructed like this:
Link: "<a href='[!--$ssLink(""ucm" & [UCM] & ".htm#_" &
[tr]&"")--]'>"&[Field12]&"</a>", except that I get an error message
that there's too many closing parentheses.

Thanks in advance for your help.

Ellen

The problem is you failed to excape the literal quote before the closing
parenthesis. Unless you escape the quote, Jet treats it as a delimiter.
You escape a special character by doubling it. The expression should
look like this:

Link: "<a href='[!--$ssLink(""ucm" & [UCM] & ".htm#_" &
[tr] & """)--]'>"&[Field12]&"</a>",

PS. It helps readability to put spaces around your operators
(specifically the ampersands)
--
HTH,
Bob Barrows


.
 
Well, to be strict, I doubled the quote that was intended to be interpreted
as a literal quote to be included in the string being built, and left the
delimiting quote alone. So yes, it does appear as if I tripled the quote,
but that was not the intent.

Thanks, Bob. Looks like you tripled the quotes before the closing
parenthesis. But it worked and for that I'm grateful.

Ellen

Bob Barrows said:
EllenM said:
Hello,
I'd like to make urls by concatenating three fields. The urls will
look like this:
<a
href='[!--$ssLink("ucm194578.htm#_Toc230422666")--]'>Introduction</a>


I think it should constructed like this:
Link: "<a href='[!--$ssLink(""ucm" & [UCM] & ".htm#_" &
[tr]&"")--]'>"&[Field12]&"</a>", except that I get an error message
that there's too many closing parentheses.

Thanks in advance for your help.

Ellen

The problem is you failed to excape the literal quote before the
closing parenthesis. Unless you escape the quote, Jet treats it as a
delimiter. You escape a special character by doubling it. The
expression should look like this:

Link: "<a href='[!--$ssLink(""ucm" & [UCM] & ".htm#_" &
[tr] & """)--]'>"&[Field12]&"</a>",

PS. It helps readability to put spaces around your operators
(specifically the ampersands)
--
HTH,
Bob Barrows


.
 
Back
Top