Not showing different photo on the form

  • Thread starter Frank Situmorang
  • 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
 
D

Douglas J. Steele

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.
 
F

Frank Situmorang

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
 

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