Pictures in records

R

RipperT

I am trying to add a picture to change with each record.
I don't want to store them in a table, just the paths.
I am following the help file instructions for "adding a
picture or object" to the letter, but I am getting a
single image that displays with all records. How can I
get the pics to change with each record?
Thanx,
Rip
 
L

Larry Linson

I am trying to add a picture to change with each record.
I don't want to store them in a table, just the paths.
I am following the help file instructions for "adding a
picture or object" to the letter, but I am getting a
single image that displays with all records. How can I
get the pics to change with each record?

My guess is that you are not setting the path and filename of the image into
the Picture property of the Image Control in the Current event of the Form,
or the Print event of the Report.

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.

Larry Linson
Microsoft Access MVP
 
R

RipperT

Thank you, Larry, I will check out the resources you
cite. I believe, however, that there is a glitch in the
Access help instruction that doesn't make sense. I tells
me to insert a picture with the image tool, then "click
the image control that is bound to the text field
containing the image paths" and insert code in the after
update event. What is the image control? Is it the
picture that I inserted earlier? If so, it doesn't have
an after update event. I don't get it.

Rip

-----Original Message-----


My guess is that you are not setting the path and filename of the image into
the Picture property of the Image Control in the Current event of the Form,
or the Print event of the Report.

The sample imaging databases at
http://accdevel.tripod.com illustrate three
 
P

PC Datasheet

Look in the Toolbox to find the image control. Add the image control to your
form. Add a hidden textbox to your form and bind the textbox to the field in
your table that contains the path to your picture. Put the following code in
the OnCurrent event of your form:
Me!NameOfImageControl.Picture = Me!NameOfHiddenTextbox

As you navigate from record to record, the image control will fill with the
picture in each record.
 
R

RipperT

I'll give it a go. Thanx.

Rip
-----Original Message-----
Look in the Toolbox to find the image control. Add the image control to your
form. Add a hidden textbox to your form and bind the textbox to the field in
your table that contains the path to your picture. Put the following code in
the OnCurrent event of your form:
Me!NameOfImageControl.Picture = Me!NameOfHiddenTextbox

As you navigate from record to record, the image control will fill with the
picture in each record.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com





.
 
R

RipperT

Doesn't something need to go in the 'picture' setting of
the image control?

Rip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top