Adding linked image to a report

R

ryanmcwh

Hi,

I've been searching the forums looking at answers to this but none
of them seem to work for me. I have a table (tbl_countries) with 3
fields(flag_id,flag_name,flag_image). As you may be able to guess this
tables contains flags, field one is an autonumber, field2 a countries
name and field 3 is the local path on the machine that corresponding
countries flag(it is a text field not a hyperlink field).

I have been able to create a form frm_countries which properly displays
the flag image with the following code:

Private Sub Form_Current()

With Me
.imgImageDisplay.Picture = .flag_image
End With

End Sub

When i try and apply this same principle to a report nothing works. I
have seen that reports don't have exactly the same syntax in some
cases. I have used the same method on my report as i did on the form,
creating an image field setting the picture field to "none", making the
image "linked" not "embedded". I can ensure that the flag path field in
is the query the report is using. How do i create the same behavior i
have on my form in a report? Thank you for any help!
 
L

Larry Linson

In what event are you setting the file path and name into the .Picture
property? There is no Current event in a Report, so you must do so in either
the Format or the Print event -- just for efficiency, I'd suggest the Print
event.

If you have a lot of pictures, or large ones, then you need to take a look
at Stephen Lebans' site, http://www.lebans.com, in regard to pictures in
Reports. That is, you may need to follow his directions about saving the
pictures as bitmaps before displaying them in a Report.

Larry Linson
Microsoft Access MVP
 
R

ryanmcwh

thanks larry,

I had the images as bitmaps..i just couldn;t figure out how to make
them display on the report. I had been trying to use..

..imgImageDisplay.Picture = me.flag_image

what i had failed to realize was that in order to use .me the value of
..flag_image needed to be printed in the report somewhere. once i
dragged that field onto the report evrything displayed correctly and i
simply set the path to each image to not be visible on the report. what
i wasn;t able to find before was a way to call the path in a table
column without having the path explicitly written on the report design.
Thanks for the advice though Larry!
 

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