Not showing different photo on the form

  • Thread starter Thread starter Frank Situmorang
  • Start date Start date
F

Frank Situmorang

Hello
I have tested to have a photo for a from and I use this code:
Set the OnCurrent property of the Imageform form to the following event
procedure:
Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End SubSet the AfterUpdate property of the ImagePath text box to the
following event procedure:
Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub

THE pOBLEM IS THE SAME PPHOTO IS SHOWN FRO FOR ALL
ALL EMPLYEES, WHY THE vba dOES WORK,

Thanks
 
Presumably ImageFrame is an unbound control on the form. When you assign a
value to an unbound control, all instances of that control receive the same
value.

Try binding ImageFrame.
 
Thanks Dough, I will try it. However Ijust followed like what is explained in
http://www.databasedev.co.uk/bound_image_form.html.

Is maybe because the image frame format property should not be OLE, may be
we snould use linked?
--
H. Frank Situmorang


Douglas J. Steele said:
Presumably ImageFrame is an unbound control on the form. When you assign a
value to an unbound control, all instances of that control receive the same
value.

Try binding ImageFrame.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Frank Situmorang said:
Hello
I have tested to have a photo for a from and I use this code:
Set the OnCurrent property of the Imageform form to the following event
procedure:
Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End SubSet the AfterUpdate property of the ImagePath text box to the
following event procedure:
Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub

THE pOBLEM IS THE SAME PPHOTO IS SHOWN FRO FOR ALL
ALL EMPLYEES, WHY THE vba dOES WORK,

Thanks
 
Back
Top