By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 1,221 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

Automated Hyperlink using concatenation

P: 2
I am trying to create an automated hyperlink in a form, based off of another field. Here is what I have so far in the after update event:

ParkerDrawingHyperlink = "#C:\Documents and Settings\shapeo\My Documents\CYLINDERS\Cylinder Drawings\#" & Me.ParkerDrawing & "#.pdf#"

This is working up to a point. It is opening the file folder on my hard drive where all the files are stored, but it is not opening the actual file.

When I look at the automated field, the following result is being populated:

C:\Documents and Settings\shapeo\My Documents\CYLINDERS\Cylinder Drawings\ - gc613058a0

The "gc613058a0" is the name of the file it should be opening. I don't understand why it is adding the extra spaces and hyphen before it though.

Any ideas?
Oct 25 '12 #1
Share this Question
Share on Google+
5 Replies


P: 2
Ok, played around with it some more and finally figured it out. YEA!!!!

Here is how it should read:

ParkerDrawingHyperlink = "#C:\Documents and Settings\shapeo\My Documents\CYLINDERS\Cylinder Drawings\" & Me.ParkerDrawing & ".pdf#"
Oct 25 '12 #2

TheSmileyCoder
Expert Mod 100+
P: 2,321
I think you have some confusion about the use of #. They are normally used around DATES to indicate that they are dates and not merely a calculation. I suggest you take the time to look at these 2 articles to get a better understanding of the concept:
Literal Datetimes and their delimiter #
Quotes (') and Double-Quotes (") - Where and When to use them.
Oct 26 '12 #3

P: 5
@TheSmileyCoder
A hyperlink entry contains three parts separated by pound signs (#). The template is:
display text # file name # any reference within the file
The following link explains in more detail:
http://allenbrowne.com/casu-09.html

Hyperlink fields can be challenging to work with if you don't use them a lot. For storing paths where a clickable hyperlink is not needed, I have had less frustration by using ordinary text fields and using a button to launch the path.
Oct 26 '12 #4

TheSmileyCoder
Expert Mod 100+
P: 2,321
Thank you Hoopla3000, for that explanation. As you can probably guess I don't work with hyperlinks alot, I just use ordinary text fields, and a button to launch the links, which are usually files on our server.
Oct 26 '12 #5

NeoPa
Expert Mod 15k+
P: 31,186
Good pickup Hoopla. I asked a question on this some time ago and the thread may prove helpful to those interested Error 7980: HyperlinkAddress or HyperlinkSubAddress read-only for Hyperlink. I believe I linked into Allen Browne then too as it happens.
Oct 27 '12 #6

Post your reply

Sign in to post your reply or Sign up for a free account.