pictures in database

D

donbigworm

I am trying to save a picture of my employees in my access database and then print said picture onto labels using an MS publisher template. I cannot seem to save teh picture in access and be able to bring it up when I bring up the file. I have created it as an OLE object and saved the link, but no picture comes up when I merge it with Publisher nor when I create a report.
 
R

Roger Carlson

In general, it is not a good idea to store the pictures as an OLE object
inside the database. It will very quickly bloat the database to its maximum
size. A better solution is to store only the path to the file in a field
and programmatically load each picture into an unbound object control on
your form or report.

On my website (see sig below) is a small sample database called
"Pictures.mdb" which illustrates how.

As to merging this with Publisher, I have no clue. However, you can create
your labels directly in Access and even designate which label on a sheet and
how many you want to print. I have another sample called
"MultipleLabelsOffset.mdb" which illustrates this as well.

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org

donbigworm said:
I am trying to save a picture of my employees in my access database and
then print said picture onto labels using an MS publisher template. I
cannot seem to save teh picture in access and be able to bring it up when I
bring up the file. I have created it as an OLE object and saved the link,
but no picture comes up when I merge it with Publisher nor when I create a
report.
 
L

Larry Linson

I am trying to save a picture of my
employees in my access database
and then print said picture onto labels
using an MS publisher template. . . .

The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.

If you are printing the images 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.

If you decide to follow Roger's advice, and mine, and need to extract your
pictures from the OLE objects, look for that, too, on Stephen Lebans' site
http://www.lebans.com. If you don't find it, check out articles 119395 and
210486 at the Knowledge Base, http://support.microsoft.com.

Larry Linson
Microsoft Access MVP
 
Top