photo in report

  • Thread starter Thread starter Bill H.
  • Start date Start date
B

Bill H.

Trying to get a photo to appear in a report. Each record has a
corresponding photo.

The repot query includes a field with the full path name to the photo. How
do I turn that info into a printing photo on the report?

Thx.
 
Just add an image control in the detail section and set its source to the
name of the field in the query.

Damon
 
When I use the Image control, it asks for a specific path to an image, and
even pops up an explorer view so I can pick the file!

Not what I want, I think...

Is there another image control? I'm using Access 2000, SP3.

Thx.
 
When I use the Image control, it asks for a specific path to an image, and
even pops up an explorer view so I can pick the file!

Not what I want, I think...

Is there another image control? I'm using Access 2000, SP3.

Thx.


Use an Image control ... but without designating a Picture.
Add the control. You need to enter a picture to be able to save the
control, so enter any valid picture path and name.
After saving the control, re-open the report in Design View. Delete
the Image Control's Picture property. It should say (none).
Then code the Report's Detail section (if that is the section that you
wish to display the pictures in) Format Event:

Me.ImageName.Picture = "c:\MyPictureFolder\" & Me.[PhotoField]

The [PhotoField] should contain the photo name and it's extension,
i.e. RockyMountains.jpg

The above assumes all of the pictures are in the same folder on your
hard drive.
 
Yes, that seems to work. They're not all in the same folder, but that's no
problem.

Thanks!

--Bill

fredg said:
When I use the Image control, it asks for a specific path to an image,
and
even pops up an explorer view so I can pick the file!

Not what I want, I think...

Is there another image control? I'm using Access 2000, SP3.

Thx.


Use an Image control ... but without designating a Picture.
Add the control. You need to enter a picture to be able to save the
control, so enter any valid picture path and name.
After saving the control, re-open the report in Design View. Delete
the Image Control's Picture property. It should say (none).
Then code the Report's Detail section (if that is the section that you
wish to display the pictures in) Format Event:

Me.ImageName.Picture = "c:\MyPictureFolder\" & Me.[PhotoField]

The [PhotoField] should contain the photo name and it's extension,
i.e. RockyMountains.jpg

The above assumes all of the pictures are in the same folder on your
hard drive.
 
Yes, that seems to work. They're not all in the same folder, but that's no
problem.

Thanks!

--Bill

fredg said:
When I use the Image control, it asks for a specific path to an image,
and
even pops up an explorer view so I can pick the file!

Not what I want, I think...

Is there another image control? I'm using Access 2000, SP3.

Thx.

Just add an image control in the detail section and set its source to
the
name of the field in the query.

Damon

Trying to get a photo to appear in a report. Each record has a
corresponding photo.

The repot query includes a field with the full path name to the photo.
How do I turn that info into a printing photo on the report?

Thx.


Use an Image control ... but without designating a Picture.
Add the control. You need to enter a picture to be able to save the
control, so enter any valid picture path and name.
After saving the control, re-open the report in Design View. Delete
the Image Control's Picture property. It should say (none).
Then code the Report's Detail section (if that is the section that you
wish to display the pictures in) Format Event:

Me.ImageName.Picture = "c:\MyPictureFolder\" & Me.[PhotoField]

The [PhotoField] should contain the photo name and it's extension,
i.e. RockyMountains.jpg

The above assumes all of the pictures are in the same folder on your
hard drive.

One way would be to add another field to your table.
[Path] Text Datatype
then store the path to the picture as a string, "c:\FolderName"

Then, in the report, use
Me.ImageName.Picture = Me.[Path] & "\" & Me.[PhotoField]
 
Yep, just what I did, using a table for "constants."

fredg said:
Yes, that seems to work. They're not all in the same folder, but that's
no
problem.

Thanks!

--Bill

fredg said:
On Sun, 19 Apr 2009 18:10:03 -0700, Bill H. wrote:

When I use the Image control, it asks for a specific path to an image,
and
even pops up an explorer view so I can pick the file!

Not what I want, I think...

Is there another image control? I'm using Access 2000, SP3.

Thx.

Just add an image control in the detail section and set its source to
the
name of the field in the query.

Damon

Trying to get a photo to appear in a report. Each record has a
corresponding photo.

The repot query includes a field with the full path name to the
photo.
How do I turn that info into a printing photo on the report?

Thx.

--
Bill




Use an Image control ... but without designating a Picture.
Add the control. You need to enter a picture to be able to save the
control, so enter any valid picture path and name.
After saving the control, re-open the report in Design View. Delete
the Image Control's Picture property. It should say (none).
Then code the Report's Detail section (if that is the section that you
wish to display the pictures in) Format Event:

Me.ImageName.Picture = "c:\MyPictureFolder\" & Me.[PhotoField]

The [PhotoField] should contain the photo name and it's extension,
i.e. RockyMountains.jpg

The above assumes all of the pictures are in the same folder on your
hard drive.

One way would be to add another field to your table.
[Path] Text Datatype
then store the path to the picture as a string, "c:\FolderName"

Then, in the report, use
Me.ImageName.Picture = Me.[Path] & "\" & Me.[PhotoField]
 
Back
Top