By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,282 Members | 1,548 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,282 IT Pros & Developers. It's quick & easy.

Images As External Files

P: n/a
Hi,

Does anyone know how to display external files (i.e. jpg files) in
reports? I have stored the file location in a table and am looking
for a control to display it in a report. I can display the photo in a
form but the same control does not work in the report. I have based
my tables and control off of Larry Linson, Imaging in Access example
database. (Awesome resource!)

Please help.
Thanks.
Kevin
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Image controls work for me in reports. I load the path and filename into the
Picture property in the Print event. 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
"Kevin" <kz*******@marcct.org> wrote in message
news:6b**************************@posting.google.c om...
Hi,

Does anyone know how to display external files (i.e. jpg files) in
reports? I have stored the file location in a table and am looking
for a control to display it in a report. I can display the photo in a
form but the same control does not work in the report. I have based
my tables and control off of Larry Linson, Imaging in Access example
database. (Awesome resource!)

Please help.
Thanks.
Kevin

Nov 13 '05 #2

P: n/a
How do you do it on the form? The way I do it on my forms is a form_current
event.
me.imgname.picture = me.txtPicturePath
for my reports i write the same code just i put it in the Detail_Format
event.
let me know if this helped.
Chaim B.
kz*******@marcct.org (Kevin) wrote in message news:<6b**************************@posting.google. com>...
Hi,

Does anyone know how to display external files (i.e. jpg files) in
reports? I have stored the file location in a table and am looking
for a control to display it in a report. I can display the photo in a
form but the same control does not work in the report. I have based
my tables and control off of Larry Linson, Imaging in Access example
database. (Awesome resource!)

Please help.
Thanks.
Kevin

Nov 13 '05 #3

P: n/a
Chaim,

I have tried your expression with no luck - do you have a sample
database that works?

Kevin

ch****@gmail.com (Chaim B.) wrote in message news:<24**************************@posting.google. com>...
How do you do it on the form? The way I do it on my forms is a form_current
event.
me.imgname.picture = me.txtPicturePath
for my reports i write the same code just i put it in the Detail_Format
event.
let me know if this helped.
Chaim B.
kz*******@marcct.org (Kevin) wrote in message news:<6b**************************@posting.google. com>...
Hi,

Does anyone know how to display external files (i.e. jpg files) in
reports? I have stored the file location in a table and am looking
for a control to display it in a report. I can display the photo in a
form but the same control does not work in the report. I have based
my tables and control off of Larry Linson, Imaging in Access example
database. (Awesome resource!)

Please help.
Thanks.
Kevin

Nov 13 '05 #4

P: n/a
Larry,

I have put this code into the open event of the
report:Me![imgTheImage].Picture = Me![txtImagePathAndFile]

When I run the report I get an error message - runtime error 13 - Type
mismatch.

How can I fix this?

Thanks
Kevin

"Larry Linson" <bo*****@localhost.not> wrote in message news:<OA7pd.7636$0k1.1375@trnddc08>...
Image controls work for me in reports. I load the path and filename into the
Picture property in the Print event. 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
"Kevin" <kz*******@marcct.org> wrote in message
news:6b**************************@posting.google.c om...
Hi,

Does anyone know how to display external files (i.e. jpg files) in
reports? I have stored the file location in a table and am looking
for a control to display it in a report. I can display the photo in a
form but the same control does not work in the report. I have based
my tables and control off of Larry Linson, Imaging in Access example
database. (Awesome resource!)

Please help.
Thanks.
Kevin

Nov 13 '05 #5

P: n/a
I use a hyperlinked text or button to access photos for my database. I
save the record as a unique value of some sort and use that value to
name the images. This way you can change the hyperlink as needed for
each record when you view the record.

Nov 13 '05 #6

P: n/a
"Kevin" <kz*******@marcct.org> wrote
I have put this code into the open
event of the report:
Me![imgTheImage].Picture = Me![txtImagePathAndFile]

When I run the report I get an error message -
runtime error 13 - Type mismatch.


Why did you choose the Open event? The only events to consider for this
purpose are the Format and Print events of the Report Section containing the
Image control. Nothing is actually displayed at the time of a Report's Open
event (which fires but once for a Report) and, if I remember correctly, no
Record is "current" at Open time.

I use the Print event for efficiency, because the Format event may fire more
than once for each Record. Print, AFAIK, only fires once when the Record is
displayed (the same record may be displayed more than once if you are in
Preview and page back and forth -- and Print will fire each time it
displays).

Larry Linson
Microsoft Access MVP
Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.