If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Make URLs
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 |
#2
|
|||
|
|||
Make URLs
EllenM wrote:
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? -- HTH, Bob Barrows |
#3
|
|||
|
|||
Make URLs
EllenM wrote:
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 |
#4
|
|||
|
|||
Make URLs
Thanks, Bob. Looks like you tripled the quotes before the closing
parenthesis. But it worked and for that I'm grateful. Ellen "Bob Barrows" wrote: EllenM wrote: 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 . |
#5
|
|||
|
|||
Make URLs
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. EllenM wrote: Thanks, Bob. Looks like you tripled the quotes before the closing parenthesis. But it worked and for that I'm grateful. Ellen "Bob Barrows" wrote: EllenM wrote: 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 . -- Microsoft MVP - ASP/ASP.NET - 2004-2007 Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" |
Thread Tools | |
Display Modes | |
|
|