Solved

ms/access 2013 records/forms with pictures

Posted on 2013-12-12
2
636 Views
Last Modified: 2013-12-16
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
Comment
Question by:jirdeaid
2 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 39714514
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
 

Author Closing Comment

by:jirdeaid
ID: 39720967
Dear FYED, many thanks for your prompt and excellent answer. I will now use it.

Joao
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now