Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 850
  • Last Modified:

MS Access 2013 - Open a PDF from a form

I have created an MS Access 2013 form in which I want to place a link in a field on the form that when clicked will open a PDF specific to the current record.   Each record will be connected to its own PDF.

All PDFs to be used will reside in a subdirectory.

Question:  What format should the field be in the table that will contain the path to open the PDF.
Question:  From the field on the form can I just copy the path and file name and paste it into the field.

Thanks for your suggestions.
Ldufresne
0
Lou Dufresne
Asked:
Lou Dufresne
1 Solution
 
Phillip BurtonCommented:
>Question:  What format should the field be in the table that will contain the path to open the PDF.
It can be Hyperlink or Text

>Question:  From the field on the form can I just copy the path and file name and paste it into the field.
Yes.

However, clicking on it will not launch it. Instead, you right-hand click it and go to Hyperlink - Open Hyperlink (if you have chosen Hyperlink instead of Text).

I would not suggest that clicking on it would launch it; it you did that, then how could the user edit it instead of click it?

Instead, create a Command Button and cancel the window. Select it and in the properties, select "On Click" and select "[Event Procedure]". Then click on ... and a new window will open, which will contain something like:

Private Sub Command20_Click()

End Sub

Open in new window


In the middle, type

[Hyperlink].Hyperlink.Follow

Where [Hyperlink] (the one in hard brackets) is your field.
0
 
Lou DufresneIT Business Analyst CSM / Project ManagerAuthor Commented:
Thanks for your assistance.  This is what I needed.
Ldufresne
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now