Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Building a Hyperlink

Status
Not open for further replies.

bcooler

Programmer
Jun 13, 2009
132
Thanks for reading this question!

I have a subform with an existing hyperlink which works well. The customer wants to see the word "MSDS" instead of the actual hyperlink. I tried to create a new field in the subform with the following source code:

Code:
="MSDS#" & [Location] & "#"

where [Location] is the field that contains the actual hyperlink.

When I open the form, the "MSDS" is in blue, is clickable, and when clicked, gives me a, "Microsoft Office Access can't follow the hyperlink to 'M:\Functions\EHS\MSDS\12311.pdf'. Please verify the destination".

So, 2 things I noticed. First, it did recognize the "[Location]" hyperlink info. Second, the single quote is showing up in the error box while the original hyperlink does not have these 2 single quotes.

I am assuming that I need to get rid of the single quote, but don't know how. I've tried every combination of double quote, "#", etc without a solution.

Thanks in advance!
 
Sorry to waste your time if you've looked at this one.....

I found that the hyperlink does not need a "#" because Access puts one in there for you.....I guess. When I pressed F2 on the form view page to see the whole hyperlink, I got 2 #'s instead of just the one that I type in. Removing them completely works great. Like this (as long as the textbox is marked as a hyperlink in the properties screen:

Code:
="MSDS" & [Location]

Thanks anyway!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top