Picture on Form problem (Access2003)

J

Johan

It looks as if I have a timing problem with placing pictures on a form.
I created a picture box on the form. I linked it to a fancy picture on my drive. I saved the form and changed the properties: I deleted the picture path name and I changed the picture type to linked.
The name is imgEmpty.

The code is:
Private Sub Form_Load()
Me.imgEmpty.Picture = "c:\xxxxx\" & Me.Albumnr.Value & ".jpg"
End Sub
Albumnr is a field on the form.

It seems that the value of Albumnr = 0 while the real value is 1. I tried it too with AfterUpdate.

When the form has been loaded and I use the same code while clicking the picture box it works
Private imgEmpty_Click()
Me.imgEmpty.Picture = "c:\xxxxx\" & Me.Albumnr.Value & ".jpg"
End Sub

Who can help me?

Thanks in advance
Kind regards,
Johan
 

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