Make URLs

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
 
B

Bob Barrows

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?
 
B

Bob Barrows

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)
 
E

EllenM

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


.
 
B

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


.
 

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

Similar Threads


Top