Link in MS Access to display image specific to a record

G

Guest

Using MS Access 2003. In a Form, I want to have an image (eg, photo) show up
specific to the Form data being entered. Eg a human records Personnel form
where I want the persons photo to show up on the Form. How best to do this?
 
L

Larry Linson

Using MS Access 2003. In a Form, I want to have an
image (eg, photo) show up specific to the Form data
being entered. Eg a human records Personnel form
where I want the persons photo to show up on the Form.
How best to do this?

The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Larry Linson
Microsoft Access MVP
 
G

Guest

Thanks Arvin & Larry (second responder to post).

Perhaps I didn't quite phrase my question accurately.
I've created an 'Object' frame in my Form. I managed to get it to show the
image I wanted for that form, (which didn't appear for the next data record
so I'm assuming I did something right) - but I can't figure out how what I
must have changed to make it work. I deleted the test data row in the source
Table that had the image appearing in that one test entry correctly to fix
another problem and recreated the same test data entry, but now, despite
confirming all the options are set to display the CONTENT, the image appears
as an icon in the frame. Makes no difference in what format the source image
is (I've tried bmp, jpg, wmf), and it makes no difference whether I've
selected embedded or linked for the property.

The image files are all in multiple folders under each persons' name - not a
central image folder where all pictures are kept.

If you can see what I'm trying to get at here and have another suggestion,
I'd be very grateful to hear from you once again.

And ... happy new year, and thanks for your time.
 
A

Arvin Meyer [MVP]

Instead of an Object control, use an Image control. The line of code that
makes it work is:

Me.ImageControlName.Picture = "C:\Path To Image.bmp"

Again, look at the download:

http://www.datastrat.com/Download/Picture2K.zip

and use it to gather all your images into a table. The add the ID of the
Personnel record to the table. Link them in a query and use data in the
table to create the path to the image file. You can do it with an OLE Object
as well, but it is much more difficult.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 

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