jpegs in report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

lost connection...sorry if this appears twice.

I created a database for my church to manage membership & collections. They
would now like to add pictures to have a printed directory. I'm someone of a
novice, so bear with me.

I added a text field 'fld_picture' to the membership table. Here I indicate
where the picture is located i.e. c:/church/smith.jpg. In the report I added
a bound object frame and in the control source of this frame I indicated
fld_picture. When I try to run the report the frame contains only the words
smith.jpg...no picture.
 
Sash,

Well you are half way there ... you have the path in your
table.

In design view for your report:
Drop an image control into your report where you want the
picture to appear. (a wizard will probably pop up and ask
you what picture you want. Point to any picture as we will
overwrite this later)
Drop the "fld_picture" field onto your report in the same
section as the image control. You probably don't want this
to show on the report so set the visible property to No.
In the report section's "On Format" event you will need to
add this code:

dim picpath as string
picpath = "[fld_picture]"
[imagename].picture = picpath

This sets the "picture" property of your image to the path
& name of your picture.

You should now be able to preview your report with the
pictures.

HTH

Terry
 
Terry,
Thank you so much! One question. Where do I get an image control? I tried
looking in Toolbox-Controls. I tried the only one that had the word image in
it, but I think it was for forms. Sorry I don't have experience with using
controls. The rest makes sense to me.
Sash

Terry said:
Sash,

Well you are half way there ... you have the path in your
table.

In design view for your report:
Drop an image control into your report where you want the
picture to appear. (a wizard will probably pop up and ask
you what picture you want. Point to any picture as we will
overwrite this later)
Drop the "fld_picture" field onto your report in the same
section as the image control. You probably don't want this
to show on the report so set the visible property to No.
In the report section's "On Format" event you will need to
add this code:

dim picpath as string
picpath = "[fld_picture]"
[imagename].picture = picpath

This sets the "picture" property of your image to the path
& name of your picture.

You should now be able to preview your report with the
pictures.

HTH

Terry
-----Original Message-----
lost connection...sorry if this appears twice.

I created a database for my church to manage membership & collections. They
would now like to add pictures to have a printed directory. I'm someone of a
novice, so bear with me.

I added a text field 'fld_picture' to the membership table. Here I indicate
where the picture is located i.e. c:/church/smith.jpg. In the report I added
a bound object frame and in the control source of this frame I indicated
fld_picture. When I try to run the report the frame contains only the words
smith.jpg...no picture.
.
 
Terry,
Thank you so much! One question. Where do I get an image control? I tried
looking in Toolbox-Controls. I tried the only one that had the word image in
it, but I think it was for forms. Sorry I don't have experience with using
controls. The rest makes sense to me.
Sash

:
*** snipped ***
It's in the ToolBox.
It's icon looks like a mountain with the moon (or sun) over it.
If you run your cursor over it it says 'Image'.
It works on forms AND reports.
 
Sash,

I should have been clearer. Fred's reply covers what to
look for.

Terry
-----Original Message-----
Terry,
Thank you so much! One question. Where do I get an image control? I tried
looking in Toolbox-Controls. I tried the only one that had the word image in
it, but I think it was for forms. Sorry I don't have experience with using
controls. The rest makes sense to me.
Sash

Terry said:
Sash,

Well you are half way there ... you have the path in your
table.

In design view for your report:
Drop an image control into your report where you want the
picture to appear. (a wizard will probably pop up and ask
you what picture you want. Point to any picture as we will
overwrite this later)
Drop the "fld_picture" field onto your report in the same
section as the image control. You probably don't want this
to show on the report so set the visible property to No.
In the report section's "On Format" event you will need to
add this code:

dim picpath as string
picpath = "[fld_picture]"
[imagename].picture = picpath

This sets the "picture" property of your image to the path
& name of your picture.

You should now be able to preview your report with the
pictures.

HTH

Terry
-----Original Message-----
lost connection...sorry if this appears twice.

I created a database for my church to manage
membership &
collections. They
would now like to add pictures to have a printed directory. I'm someone of a
novice, so bear with me.

I added a text field 'fld_picture' to the membership table. Here I indicate
where the picture is located i.e.
c:/church/smith.jpg.
In the report I added
a bound object frame and in the control source of this frame I indicated
fld_picture. When I try to run the report the frame contains only the words
smith.jpg...no picture.
.
.
 
"Sash" wrote
I added a text field 'fld_picture' to the
membership table. Here I indicate
where the picture is located i.e.
c:/church/smith.jpg. In the report I added
a bound object frame and in the control
source of this frame I indicated
fld_picture. When I try to run the report
the frame contains only the words
smith.jpg...no picture.

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


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.
 
Back
Top