• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 677
  • Last Modified:

ms/access 2013 records/forms with pictures

I have a database that has personal record for which I want to associate a JPG picture, to be shown embedded in a form or a report, and want to associate a PDF file that can be shown after the press of a button.

How do I do it?
Both the pictures and the PDF file are external to the Database and not embedded
0
João serras-pereira
Asked:
João serras-pereira
1 Solution
 
Dale FyeCommented:
1.  With the JPG image, create an image control on your form, but don't assign it a picture property.  Assuming you have a field in your underlying data that contains the name of the JPG and the path to it, use the Current event of your form to assign that path\filename to the Picture property of your image control.

Private Sub Form_Current

    me.imgPhoto.Picture = me.[PicFileName]

End sub

2.  For the PDF, you will also need to have a field in your underlying data which contains the path\filename of the PDF file.  I usually use a text datatype, but you could use the hyperlink datatype.  I then place a button next to the textbox that displays that path\filename and use the Application.Followhyperlink method in the CLICK event of the button to open the PDF

Private Sub cmd_OpenPDF_Click

    application.FollowHyperlink me.txtPDFFilename

End Sub

untested code sent from my iPad.
0
 
João serras-pereiraAuthor Commented:
Dear FYED, many thanks for your prompt and excellent answer. I will now use it.

Joao
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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