dbTalk Databases Forums  

Images As External Files

comp.databases.ms-access comp.databases.ms-access


Discuss Images As External Files in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kevin
 
Posts: n/a

Default Images As External Files - 11-24-2004 , 01:31 PM






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

Reply With Quote
  #2  
Old   
Larry Linson
 
Posts: n/a

Default Re: Images As External Files - 11-24-2004 , 04:05 PM






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" <kzingler2 (AT) marcct (DOT) org> wrote

Quote:
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



Reply With Quote
  #3  
Old   
Chaim B.
 
Posts: n/a

Default Re: Images As External Files - 11-24-2004 , 05:21 PM



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.


kzingler2 (AT) marcct (DOT) org (Kevin) wrote in message news:<6b8efbe0.0411241131.1d4fa841 (AT) posting (DOT) google.com>...
Quote:
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

Reply With Quote
  #4  
Old   
Kevin
 
Posts: n/a

Default Re: Images As External Files - 11-30-2004 , 08:11 AM



Chaim,

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

Kevin

chaimb (AT) gmail (DOT) com (Chaim B.) wrote in message news:<24b98d13.0411241521.5578f207 (AT) posting (DOT) google.com>...
Quote:
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.


kzingler2 (AT) marcct (DOT) org (Kevin) wrote in message news:<6b8efbe0.0411241131.1d4fa841 (AT) posting (DOT) 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

Reply With Quote
  #5  
Old   
Kevin
 
Posts: n/a

Default Re: Images As External Files - 11-30-2004 , 08:15 AM



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" <bouncer (AT) localhost (DOT) not> wrote

Quote:
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" <kzingler2 (AT) marcct (DOT) org> wrote in message
news:6b8efbe0.0411241131.1d4fa841 (AT) posting (DOT) 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

Reply With Quote
  #6  
Old   
Billie Kennedy Jr
 
Posts: n/a

Default Re: Images As External Files - 11-30-2004 , 08:37 AM



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.


Reply With Quote
  #7  
Old   
Larry Linson
 
Posts: n/a

Default Re: Images As External Files - 11-30-2004 , 11:20 PM



"Kevin" <kzingler2 (AT) marcct (DOT) org> wrote

Quote:
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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.