access hyperlink using data from record on form

G

gymphil

I am trying to create hyperlinks on a continuous form to open individual PDF
files that are in the same directory as the database itself. Rather than
manually creating the link in the table I want to use the data in the record
field as part of the path for the link in a form, I need to include ".pdf" as
the path extension. Can anyone assist?
Any help would be appreciated.
 
D

Daniel Pineault

If I understand you properly you do something like

Me.HyperlinkControlName = Application.CurrentProject.Path & "\" &
Me.FileControlName & ".pdf"

or if you want to open the file you'd use the followhyperlink method,
something like:

Application.FollowHyperlink Application.CurrentProject.Path & "\" &
Me.FileControlName & ".pdf"
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
G

gymphil

Daniel,

Many thanks, I used the following code, it opens the correct pdf file but
immediately minimizes it (the database form remains open). Any ideas how to
get over this?

Phil

Application.FollowHyperlink Application.CurrentProject.Path & "\" &
Me.FileControlName & ".pdf"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top