Solved

ms/access 2013 records/forms with pictures

Posted on 2013-12-12
2
662 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

690 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