473,394 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Adding Images to Reports from File Paths

Hi,

I'm trying to add images to a report, pointing to a field in a query
containing the file path (a combination between a string value and an
existing field). There's nothing wrong with the path, but for some
reason I get a message saying it can't find the field "IMAGE_PATH".
I'm using the following code, which should work:

Me!ImageFrame.Picture = Me.IMAGE_PATH.Value

The field is in my list and I even get it popping up when coding, as a
valid field to use.

What am I doing wrong? Should I be pointing at the query differently?

Cheers

Dean

Aug 7 '07 #1
3 4990
In Reports, Access is "smart" and even though the Field may be in the Record
Source, if it is not the Control Source of a Control, it will not be brought
along at runtime. Using it in VBA code, as you are, is not enough. Add a
Control to your Report, bound to IMAGE_PATH, and set its Visible property to
No if you don't want it to be seen. (Don't name the Control the same as the
Field, IMAGE_PATH, so as to avoid any possible confusion -- txtImagePath
should work nicely.)

I'll wager you won't have the same problem after that. If you do, refer to
that Control, instead of the Field itself.

Larry Linson
Microsoft Access MVP
"Dean" <de**********@yahoo.comwrote in message
news:11**********************@g12g2000prg.googlegr oups.com...
Hi,

I'm trying to add images to a report, pointing to a field in a query
containing the file path (a combination between a string value and an
existing field). There's nothing wrong with the path, but for some
reason I get a message saying it can't find the field "IMAGE_PATH".
I'm using the following code, which should work:

Me!ImageFrame.Picture = Me.IMAGE_PATH.Value

The field is in my list and I even get it popping up when coding, as a
valid field to use.

What am I doing wrong? Should I be pointing at the query differently?

Cheers

Dean

Aug 7 '07 #2
Hi Larry,

Thanks for the reply! I got this working with your suggestion, BUT
(yes, you just knew this was coming...) I get a run-time error 2114
saying that it can't use the image... 'blah-blah.jpg'. Now, I know
for a fact that I've done this with the same images before and they're
all JPEGs. Also, it gives that message for a different image
everytime. I have 574 images in total.

What could this issue be?

Cheers

Dean

Aug 8 '07 #3
Could it be that the graphics filters were, for some reason, not installed?
That's about all that comes immediately to mind.

If you have 574 images, you may well have to take a look at 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.

But, I can't remember trying a report with many pictures, not using that
technique, or files that already were bitmaps, since Access 97... the memory
leakage problem _could_ have been corrected. Stephen also has a freely
downloadable Control that might be of Help -- I haven't used it in a Report,
either, but I have a lot of confidence in Stephen's work.

Larry Linson
Microsoft Access MVP

"Dean" <de**********@yahoo.comwrote in message
news:11**********************@i13g2000prf.googlegr oups.com...
Hi Larry,

Thanks for the reply! I got this working with your suggestion, BUT
(yes, you just knew this was coming...) I get a run-time error 2114
saying that it can't use the image... 'blah-blah.jpg'. Now, I know
for a fact that I've done this with the same images before and they're
all JPEGs. Also, it gives that message for a different image
everytime. I have 574 images in total.

Aug 8 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: marwa mohamed | last post by:
salamo alikom hi all when i run report that includes image control linked to a field in the table that contains the image path(on the server)and the record source of the report contains over 30...
3
by: Chris Minchin | last post by:
Hi there, I am a bit of a newboy to access I have a database which I wish to have pictures. for example: record one will have data and a picture, record two will have different data and a diferent...
4
by: Bernie Raffe | last post by:
When I change the 'cookieless' flag in the WebConfig file to true, everything works fine on my local PC, but the images fail to appear when using the remote server. I specify my images...
15
by: Jameson | last post by:
Happy New Year, Everyone! I am trying to figure out how to display a bunch of images (mainly JPEGs, but possibly a few GIFs and PNGs as well) that are stored in a local directory on the system....
1
by: Xah Lee | last post by:
The following is a program to generate thumbnail images for a website. Useful, if you want to do that. It is used to generate the thumbnails for my “Banners, Damsels, and Mores” project...
1
by: colmkav | last post by:
Hi, when I try to add a logo to my form I click on the unbounded object frame and then browse for tje location of my logo. I open the .bmp file but get an error claiming "OLE object isnt...
1
by: BRAHM | last post by:
Hi, I am creating reports using the crystal reports available in VS 2005. I am not figuring out how to load dynamically images in a picture box (at runtime) inside of my reports. how could...
3
by: evenlater | last post by:
I have an Access application on a terminal server. Sometimes my users need to export reports to pdf, rtf or xls files and save them to their own client device hard drives. They can do that right...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.