Unable to display pictures in a report!

T

Telesphore

Using the MS Knowledge Base number 285820 to display images in a report in
Access 2002, the report always displays the same picture!

I must miss something.

The problem seems to origin when I use the toolbar button (Image) to insert
a picture from the hard disk, so that it is automatically inserted in the
image property image, for example C:\Documents and
Settings\Administrator\Desktop\IFTM (Essays)\BarretteSP.bmp.

Any help will be appreciated.
 
F

fredg

Using the MS Knowledge Base number 285820 to display images in a report in
Access 2002, the report always displays the same picture!

I must miss something.

The problem seems to origin when I use the toolbar button (Image) to insert
a picture from the hard disk, so that it is automatically inserted in the
image property image, for example C:\Documents and
Settings\Administrator\Desktop\IFTM (Essays)\BarretteSP.bmp.

Any help will be appreciated.

Store the path and picture name in a field [PathPicture] in your table
("c:\Path\PictureName.bmp")
Include that field in the report's record source.
Add an Image control to the report.
(Let's assume you place the control in the Detail section.)
After you add the Image control, delete the Picture Property (it
should read (none).

Then code the Detail Format event:

ImageName.Picture = [PathPicture]

If a record does not have a picture the previous picture will be
displayed.
If you would rather not have the previous picture display, you can
either have a default picture displayed, or make the control Not
Visible.

If IsNull([PathPicture]) Then
ImageName.Visible = False
Else
ImageName.Picture = [FieldName]
ImageName.Visible = True
End If
 
T

Telesphore

All set now. Thank you very much.


fredg said:
Using the MS Knowledge Base number 285820 to display images in a report in
Access 2002, the report always displays the same picture!

I must miss something.

The problem seems to origin when I use the toolbar button (Image) to insert
a picture from the hard disk, so that it is automatically inserted in the
image property image, for example C:\Documents and
Settings\Administrator\Desktop\IFTM (Essays)\BarretteSP.bmp.

Any help will be appreciated.

Store the path and picture name in a field [PathPicture] in your table
("c:\Path\PictureName.bmp")
Include that field in the report's record source.
Add an Image control to the report.
(Let's assume you place the control in the Detail section.)
After you add the Image control, delete the Picture Property (it
should read (none).

Then code the Detail Format event:

ImageName.Picture = [PathPicture]

If a record does not have a picture the previous picture will be
displayed.
If you would rather not have the previous picture display, you can
either have a default picture displayed, or make the control Not
Visible.

If IsNull([PathPicture]) Then
ImageName.Visible = False
Else
ImageName.Picture = [FieldName]
ImageName.Visible = True
End If
 

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