Display an image based on a field choice

goggy59

New member
Local time
Today, 00:04
Joined
Feb 28, 2014
Messages
2
Hello,

Fairly new user to Access here.

I am trying to show an image on a form based on a user choice from a drop down box. For example, the user needs to choose a priority for a task. If the user chooses "Immediate" I want an image of an exclamation point to show up to draw attention that this is important.


Thank You,
Goggy
 

Attachments

  • access.JPG
    access.JPG
    11 KB · Views: 110
First of all, I'm not that great so apologies if our learned friends tell me I'm wrong.

If its not a continuous form you might try this.
Put three images on the form. All with Visible = No.
(after testing you can place them one on top of the other in the same place)
Name the images imgImmediate, imgLater, imgSoon.
Name the combo cboMyCombo.
You'll now need a bit of code. In the cboMyCombo.AfterUpdate event try this.

Private Sub cboMyCombo.AfterUpdate()
'first we need to always hide all three images
Me.imgImmediate.Visible = False
Me.imgLater.Visible = False
Me.ingSoon.Visible = False
'now we want to show the correct image
Select Case cboMyCombo
Case "Now"
imgImmediate.Visible = True
Case "Later"
imgLater.Visible = True
Case "Soon"
imgSoon.Visible = True
End Select
End Sub

Put the same code in the form's OnCurrent event.
 
Thank you, I will give it a try!
 

Users who are viewing this thread

Back
Top Bottom