You should use an Image control to display the photo. Here's a snippet of
code I use to display the image file for a particular record; this is placed
in the Current event of the form. The full path/filename of the image file
is in a textbox control named txtImageFile, bound to the table field where
the path/filename is stored. I use the same code in the AfterUpdate event
of the textbox to update the picture if the path/filename is changed.
If Not IsNull(Me.txtImageFile) Then
Me.imgImage.Picture = Me.txtImageFile
Else
Me.imgImage.Picture = ""
End If
The same thing works in a report, except you use the Format event of the
report section which contains the image control (that's the equivalent of a
form's Current event).
And one other tip - if you set the Size Mode of the image control (it's on
the Format tab in the Properties dialog) to Zoom, your image will resize to
fit the control, and retain it's aspect ratio.
Finally, to prevent possible crashes when scrolling through records or
report pages, you should incorporate the registry changes described here:
http://www.mvps.org/access/api/api0038.htm
HTH,
Rob
>A client wants to add digital camera photos to a multiuser equipment
>maintenance database. I do not plan to store the photos in the .mdb, but
[quoted text clipped - 10 lines]
>
> drb
drb - 24 May 2007 16:50 GMT
Thanks Rob -- I'll try your suggestions. Somewhere I thought I read
that image control objects become part of the .mdb, that's why I was
looking at the unbound object frame.
drb
> You should use an Image control to display the photo. Here's a snippet of
> code I use to display the image file for a particular record; this is placed
[quoted text clipped - 39 lines]
>>
>> drb