In the OnOpen event of my form I would like the form to look up values in a table that contain the image control name and the imagefilename for the control.
I would like the form to load the imagefilename into the picture property of the image control from the value in the table. The table contains the image control name and the filename of the image to be used.
I know I have to loop through the table and I've gotten the data values from the table. but I'm stuck on using the data value for the image control name and matching it to the control in the form so that I can populate the image control picture property.
I hope this makes sense!
For example:
Table1
ID ImageControl ImageFileName
1 Image1 file1.bmp
2 Image2 file2.bmp
3 Image3 file3.bmp
The form would have the following controls
Image1, Image2, Image3, Image4, Image5, Image6, Image7, etc.
On open the form would look up the table and wherever it sees the image control name it takes the value from the ImageFileName column and puts it in the image control picture property.
Any help would be much appreciated. Thanks,
Ernie
I would like the form to load the imagefilename into the picture property of the image control from the value in the table. The table contains the image control name and the filename of the image to be used.
I know I have to loop through the table and I've gotten the data values from the table. but I'm stuck on using the data value for the image control name and matching it to the control in the form so that I can populate the image control picture property.
I hope this makes sense!
For example:
Table1
ID ImageControl ImageFileName
1 Image1 file1.bmp
2 Image2 file2.bmp
3 Image3 file3.bmp
The form would have the following controls
Image1, Image2, Image3, Image4, Image5, Image6, Image7, etc.
On open the form would look up the table and wherever it sees the image control name it takes the value from the ImageFileName column and puts it in the image control picture property.
Any help would be much appreciated. Thanks,
Ernie