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?
LVL 1
filtrationproductsAsked:
Who is Participating?
 
ioanePlanning & Analytics ManagerCommented:
Hi filtrationproducts,

As I stated in my comment above, for the replace function to work you need to only replace the first instance of the #.
i.e. Replace("#","",1)

If you have a # in your actual filename then you probably need to do away with the hyperlink altogether and just store the filename as a text string.

You can then emulate a hyperlink by using the OnClick event and the FollowHyperlink function.
i.e. FollowHyperlink("J:\elements\documentation\TORO # 74-3570.SLDDRW",,True)
0
 
Jeffrey CoachmanMIS LiasonCommented:
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
0
 
Jeffrey CoachmanMIS LiasonCommented:
Or wrap in single quotes

    YourHyperlinkField=Replace(YourHyperlinkField,"#","'#'")
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
ioanePlanning & Analytics ManagerCommented:
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.
0
 
filtrationproductsAuthor Commented:
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#

0
 
filtrationproductsAuthor Commented:
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
0
 
filtrationproductsAuthor Commented:
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.
0
 
filtrationproductsAuthor Commented:
Tramtrak: I will try that now
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.