Solved

ms/access 2013 records/forms with pictures

Posted on 2013-12-12
2
616 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

760 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

20 Experts available now in Live!

Get 1:1 Help Now