link to pdf (1 Viewer)

kitty77

Registered User.
Local time
Yesterday, 22:52
Joined
May 27, 2019
Messages
713
I'm trying to create a hyperlink to a pdf based on a number.

So, I have a folder on my network where the pdf's live. On my form, I have a field with the number. Example, abc.pdf, 123.pdf.

I would like to be able to click on that field or value and it would link to the proper pdf.

Thanks...
 

kitty77

Registered User.
Local time
Yesterday, 22:52
Joined
May 27, 2019
Messages
713
Not sure I explained it correctly...
I'm actually just looking to link to that pdf based on the number.

So, it would be the path \\somthing\ and the [field]

Example: \\path\abc.pdf if I click it or use a button, it would open the pdf if it exists.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 22:52
Joined
Feb 19, 2002
Messages
43,445
Gasman understood the request. I'll expand.

Do not use the hyperlink data type. Just define a text field in the table. If you want to show a different value as you can do with the hyperlink data type, use two columns. One for what you want to display and the other for the actual link.

Using the FollowHyperlink method, works on any file type that windows recognizes including web pages, pdf's, Excel, Word, etc.
 

Gasman

Enthusiastic Amateur
Local time
Today, 03:52
Joined
Sep 21, 2011
Messages
14,417
Code:
strFile = "\\somthing\" & Me.txtFileName
Application.FollowHyperlink strFile,,True

If the txtFileName control does not have the .pdf extension then add that as well.

HTH
 

Users who are viewing this thread

Top Bottom