Display image depending on combo box value (1 Viewer)

Steven.Ashby82

Registered User.
Local time
Today, 04:39
Joined
Jan 14, 2013
Messages
63
Hi All
I want to display a certain image based on a certain selection from a combobox for example if "No1"was selected in cbo then I would want imgNo1 to display. I have a total of 4 values and images.

I'm trying to piece together code at the moment but I'm not getting anywhere fast. I can work it with two options but it gets messy with 4.

Thank You
 
Hello Steven, you need to use the combination of the AfterUpdate of the ComboBox and the Image control.Picture property to get this working..

A small sample I have put up on how it works.. Not much in detail.. I have a Unbound ComboBox which will have options "Screen" and "Man Lost". So when you select, it will link the picture to the file..

To make it work properly "Extract Here" the ZIP file in C:\
 

Attachments

Thank you this method worked perfectly
 
pr2-

I think this is what I am looking for as well, but wanted to ask a couple questions...

I have an unbound form (like RAWDATA) with a combobox that queries for counties. Once I choose the county I would like for the county image to appear.

tblCounty
CountyID-PK
StateID
CountyName

Is it possible to easily change the code to reflect that or does it need to be Case by Case as in your code? For clarification there are 2696 something counties....

I tried a old picsubform in an older database in a new form, but when trying in actual form I found that I am unable to link to unbound forms together...

I would appreciate any thoughts you may offer :)
 
Once I choose the county I would like for the county image to appear.
I would just add another field hyperlink to the table.

tblCounty
CountyID-PK
StateID
CountyName
countryImageLocation
Is it possible to easily change the code to reflect that or does it need to be Case by Case as in your code?
Do not go for case statement, just use the Hyperlink from the Combobox. Your code will be so much simpler.
I am unable to link to unbound forms together...
Binding unbound forms could be a lot trickier. More info is needed to give an appropriate answer.
 

Users who are viewing this thread

Back
Top Bottom