images to appear in report

D

david james

I have an Access database that stores a catalogue of photographs.
Each photo has a record in the main table and one of the fields is called "image". This a link to a file on the hard drive i.e. "C:\images\photo25.jpg"

I would like to print a list of photos, showing a thumbnail image of each photo. How can I create a report that shows the description and the image next to it.

I can get a report to show the text descriptions but not the images (the best I achieved was to have photo #1 showing on all entries)

Many thanks if you have any ideas.
 
M

MacDermott

Put an Image control (I'll call it MyImg) on your report in the Detail
section where you want to display the image.
In the Detail_Format event procedure of your report, put code like this:
MyImg.Picture=[Image].value

HTH
- Turtle
david james said:
I have an Access database that stores a catalogue of photographs.
Each photo has a record in the main table and one of the fields is called
"image". This a link to a file on the hard drive i.e.
"C:\images\photo25.jpg"
I would like to print a list of photos, showing a thumbnail image of each
photo. How can I create a report that shows the description and the image
next to it.
I can get a report to show the text descriptions but not the images (the
best I achieved was to have photo #1 showing on all entries)
 
L

Larry Linson

Put an Image control (I'll call it MyImg)
on your report in the Detail section where
you want to display the image.
In the Detail_Format event procedure of
your report, put code like this:
MyImg.Picture=[Image].value

It may be more efficient to put your code in the Print event, because it
won't be fired as many times as a Format event. It is also a good idea to
convert those .jpg files to .bmp form before using them in the Image Control
(at least some versions of Access can have memory problems if you don't do
so).

There's good information on this at MVP Stephen Lebans' site, at
http://www.lebans.com/printfailures.htm.

Larry Linson
Microsoft Access MVP
 

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