photo in report

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.
 
D

Damon Heron

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

Damon
 
B

Bill H.

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.
 
F

fredg

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.
 
B

Bill H.

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.
 
F

fredg

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]
 
B

Bill H.

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]
 

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