I chugging along.
We have...
Changed the Photo field to a text field.
Added a picture name to the field i.e. 10050.jpg
Added the field to the report query.
Added the field to the report.
Added an "Image" box, and associated a pic with it (part of the wizard),
saved it, the pic was showing.
Deleted the pic from the image "Picture" setting, it changed to (None).
Picture type is "Embedded", Size Mode is "Clip", Picture alignment is
"Centered".
Right clicked in the detail section of the report and clicked "Properties",
Clicked on the "Event" tab then click on "On Format", [Event Procedure]...
and copied the below into it...
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.ImageName.Picture = "C:\More Pics2 & [Foto]"
End Sub
However when I compile this it doesn't like the "ImageName" part. What am I
doing wrong? Can you please help?
Thanks.
Iram/mcp
fredg said:
On Sat, 25 Jul 2009 15:49:00 -0700, Iram wrote:
Hello.
I am using Access 2003. When I pull up a record on a form or report I would
like to view the associated picture. The pictures reside in a folder such as
C:\Pictures\. I don't want to embed them into the database rather I would
like the field called "Photo" in a form and in a report to automatically pull
a preview of a particular pic into it.
Is this possible, if so how would I make it work?
Thanks.
Iram/mcp
Set the [Photo] field (in the table) to Text datatype.
Then, using a form for data entry, enter the picture name, and it's
extension, in the [Photo] field, i.e. SummerFlowers.jpg.
To show the picture on a report....
Include the [Photo] field in the Report's record source.
Add an Image control to the report. You will have to set the Picture
property to a picture and save the change. Then, delete the control's
picture property. When done it should read (none). Save the change.
Code the Report Section's (i.e. Detail section) Format event
Me.ImageName.Picture = "C:\Pictures\" & [Photo]
To show the picture on a form...
Add the Image control to the form as above.
Code the Form's Current event as above.