Unanswered: how to relate to image in another form?
I am facing a problem related to images in forms.
Well, here is my problem
Form1: I have PicID field in a form based on table and an image box named img
Form2: holds a number of image boxes..image1 hosts the picture of PicID if it is 1, image 2 hosts the picture of PicID if it is 2 and so on.
Now I need somethings to do.
1 ) in form1 coding I need to open form2 autumatically without me clicking on the form2...it sounds so simple and I really tried lots of codes but I don't know why it shouldn't work and I deleted all what I did due to frustration. so I can't post my code about this section
2)Then I need to tell form1 to retrieve the image of the same value of PicID
Here is my code put into a nextvaluebutton:
Me.Img.Picture = Forms!Form2!Image & Me.PicID & .Picture 'of course Form2 should be open
This does not work...it works when I write this:
Me.Img.Picture = Forms!Form2!Image1.Picture 'of course Form2 should be open
but I want it to change the image box according to the change in value of PicID, so that it shows image1 if PicID = 1 and shows image2 if PicID = 2 and so on.
I can't use IF statement since there are so much pictures
Is it clear? I hope so....
I know there are other ways to display pictures but i am really determined to do this because it suits the design of my program so well that I um fixed to it.