Getting Photos to work in form

robin123

Registered User.
Local time
Today, 12:34
Joined
Nov 14, 2006
Messages
20
I Have been trying for a while to get photographs to work in a form. At the minute I can select the file I want to add to the form but when I move to the next record the same picture is still displayed and I cannot understand why this is happening. I have adapted the code form the sample databases which are available on here.
I have attached a cut down version of the database which include the form with the picture control. If you could have a look at it and give me some help it would be very greatly appreciated.
Thanks
 

Attachments

You need to add this to the Main forms Current event:

If Not IsNull([PicFile]) Then
Forms!TAble1!picsubform![imgPicture].Picture = [PicFile]
SysCmd acSysCmdSetStatus, "Image: '" & [PicFile] & "'."
Else
Forms!TAble1!picsubform![imgPicture].Picture = ""
SysCmd acSysCmdClearStatus
End If

Dave
 
The forms current event fires each time you move from one record to another.

All you missed was the code to refresh the image each time.

Dave
 

Users who are viewing this thread

Back
Top Bottom