How to display scanned images from a form

  • Thread starter charles.kendricks
  • Start date
C

charles.kendricks

I have a patient database, but a lot of the old patient records were
scanned and stored previous the development of the database. All of
the scanned image files are named using the patients FirstName_LastName
as the first part of the file name.

What I want to do is to be able to display those scanned images for the
patients from a form which I use to look up other information for the
patients. Of course two of the fields on the form are patient
FirstName and LastName.

I'm sure there must be a fairly straightforward method to accomplish
this, even for a novice such as myself.
 
R

Roger Carlson

You'll want to load each picture into an image control on the form
programmatically. Usually, people store the actual file name in a table,
but if all the images are named consistantly with FirstName_Lastname, and
you are already displaying these fields on the form, you should be able to
build the file name in code as well.

pathname = CurrentProject.Path
Me.ImgControl.Picture = pathname & "\" & Me.FirstName & "_" &
Me.Lastname & ".jpg"

Note: you'll have to change the extention (.jpg) to whatever file format
your image is using. Also replace ImgControl with the actual name of your
Image Control.

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "Pictures.mdb" which illustrates how to do this.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top