Results 1 to 3 of 3
Thread: Add pictures to a report
2009-04-11, 14:57 #1
- Join Date
- Sep 2008
- Virginia, USA
- Thanked 0 Times in 0 Posts
I used to be able to add pictures to reports in Access 97 or 2000 by:
[*]add field (OLE object type) to table, [*]insert picture into field using Datasheet view:[*]Insert Object, Create from file, Browse to find desired jpg file (sometimes using Link, sometimes not)
Now I am unable to achieve the same results using Access 2002 or 2003. Using 2003 I was able to display a bitmap image, but not a jpg picture. In tblPICs the [picfield] contents appear as the letters "package"; the report based on this table displays a blue and white JPG icon (same icon regardless of actual underlying picture).
Does Access 2002/2003 no longer accept jpg files, or am I doing something wrong?
2009-04-11, 16:43 #2
- Join Date
- Aug 2001
- Evergreen, CO, USA
- Thanked 60 Times in 60 Posts
I believe there were some changes in picture handling if you use the 2002/2003 database format. The Help for Access 2002 basically says for forms or reports to:
- create an OLE Object field in your table
- add an image control that is bound to an OLE Object field
- choose the field name of the OLE Object as the data source for the image control
Unfortunately storing pictures in an Access database is not a good idea - the database quickly balloons in size as Access stores both the JPG (I was able to store a JPG without difficulty in 2002 - you just have to choose all files in the dialog), and a BMP version of the picture. A better choice is to store the path to the photo, and use code to dynamicaly bind the form or report to the image. The help file also gives you sample code to do exactly that.
Hope this helps.Wendell
2009-04-13, 09:21 #3
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
As WendellB has indicated, storing images in a database is not a good idea in Access 2003 and before (Access 2007 has much improved image handling). See post 296892 for a way of using the path to external image files in a form and report using an image control. The image control doesn't have the same limitations that the OLE control has. (See Images that are stored in OLE object fields do not appear correctly about the latter problem).