View Full Version : Linking a picture to a value in a combo box?


jtracy
04-02-2002, 07:52 AM
Hey all,

Using access 97

Is this possible? I have a combo box with 4-5 values entered..and would like to somehow have an image load when a particular value is selected-one picture for each value.

Thanks for any help!

cpod
04-02-2002, 10:02 AM
In the afterupdate event of your combobox use something like this:

Private Sub Combo1_AfterUpdate()
Select Case Me!Combo1
Case Is = 1
Me!Image0.Picture = "PatchandNameofImage1"
Case Is = 2
Me!Image0.Picture = "PatchandNameofImage2"
Case Is = 3
Me!Image0.Picture = "PatchandNameofImage3"
Case Is = 4
Me!Image0.Picture = "PatchandNameofImage4"
Case Is = 5
Me!Image0.Picture = "PatchandNameofImage5"
End Select
End Sub