Link to home
Start Free TrialLog in
Avatar of filtrationproducts
filtrationproductsFlag for United States of America

asked on

Issue with Hyperlink 'Text to Display' containing # Symbol in Access

I have a Access front end that displays a hyperlink retreived from a SQL server. The problem is that one of the 'text to display' part numbers has a # symbol in it and that causes it truncate or not connect to the proper hyperlink in the back ground. Is there a way to encapsulate this # symbol so it wont affect the hyperlink?
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

filtrationproducts,

Well, without seeing the string, all I can suggest is that you replace the  "#" with an empty string (""):

    YourHyperlinkField=Replace(YourHyperlinkField,"#","")

Can you paste the string here for us to examine?

JeffCoachman
Or wrap in single quotes

    YourHyperlinkField=Replace(YourHyperlinkField,"#","'#'")
filtrationproducts,

I don't tihink there is anyway to include the # in any part of a hyperlink.

boag2000 is right about needing to replace the # but you only want to replace the first instance so:
YourHyperlinkField=Replace(YourHyperlinkField,"#","",1)

Note: this will only work with situations where there is a hash (#) in the display text.

You may want to count the number of #'s first to determine if there are more than 3 etc.
Avatar of filtrationproducts

ASKER

The hyperlink is created from a query. Here is what the problem hyperlink data looks like.

TORO # 74-3570#J:\elements\documentation\TORO # 74-3570.SLDDRW#

I tried putting the code below in the query for the "display text" field. But its not working.
Replace("#","")

How can I configure the 1 column in the query to remove the # symbols.
temp.JPG
I changed ID to display only the word "drawing" but the # symbol in the hyperlink itself causes it to error. I dont know if this is going to be possible.

Is there anyway to make a hyperlink containing a # symbol work in Access. I cant remove the # because its the actual filename and this cannot be changed.
ASKER CERTIFIED SOLUTION
Avatar of ioane
ioane
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Tramtrak: I will try that now