Discussion Locked

Access 97--Displaying images on reports

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I want to print images from graphic files (such as jpg, pcx, tif types) on reports. However, when I try to access the Picture property of the image control (me.imagex.picture), the picture property is not available, so I can't load the location of the image for each record into the control for printing.

This is the same whether the picture type is set to linked (which I prefer) or embedded.

I've tried this on two different systems and even re-installed Access 97 (SR2) on one of the systems, but no luck.

Anyone have a solution???

8 replies

by mdavis

Do you want a different picture for each record in your table? If so, add a field with the data type set to OLE to your table. The OLE field will get the path and file name for your image, but forms and reports should display the actual image. I hope this helps.

by bob sellman

Even though it does display a
graphic on a report, it doesn't do what
I wanted. See the comment I added to
the question.

by bob sellman

While I do want to display a different
picture for each record, making an OLE field
in the table creates other problems. As far
as I can tell, there does not seem to be a
way to identify the picture file (I would
link with a file name/path) with a file name
that would be loaded via VBA into the OLE
field when the report is printed (or when
loading data electronically). This is
basically the same thing I wanted to do with
an image control on the report...load the
picture property with the file name just like
you can do on a form.

I need to be able to load the picture
filename two ways:

1. On a form in the database by entering the
filename in a text field on the form. When
the field is updated I would then move it
into the OLE field, if that is possible,
using VBA.

2. By electronically importing a list of
file names and updating the OLE field in each
record.

by donq

Bob,

I pass this on because I have enjoyed your help before and know you understand Access?VB very well. - I found a guy named Michael Krell that answers questions through the Developers Republic / Programming. He is extremely knowledgable and goes by the tag "Peyison" (his company). If anyone can help he could?

Good Luck

p.s. don't approve this X it and save your points for the Developer Republic where I would suggest you re-post the same question and comments

good luck

by peyison

Bob,

First off - sorry about the missing MoveNext in the previous answer... :|

It seemed to me that your initial idea of accessing the Picture property should be the way to go, but like with you, the Picture property was not available, or so Ithought.

The Properties/Methods list seemed to be more for a combo box control rather than an Image control, so I ignored it and tried to set the Picture property anyway. In the sub Detail_Format I had the line:

Me!imgMyImage.Picture = "C:\MyDocuments\testpic.jpg"

and when I ran the report, it loaded that image into every instance of the image control. I didn't go so far as to create a table with a field for the filename and test it that way, but I think if you go with what you've got - it should work.

Hope this helps.

by bob sellman

Microsoft strikes again.... You're
right, the Picture property (and the
Visible property, which I also needed)
works fine, although Microsoft would
have us think it's not available on
reports. Thanks for ignoring the
"rules". We can all learn from this to
assume that Microsoft may not be giving
us good guidance (with the tools
provided). Thanks. It now works like I
want.

This discussion is closed to new replies.