How to add graphic on 'click'

  • Thread starter Thread starter KerryInOz
  • Start date Start date
K

KerryInOz

Hi, I am using Access 2003 and would like to add a function on the data entry
screen so that when a box is 'ticked' a graphic appears on that record. It
is an 'Alert' graphic (which I don't have yet). The alert needs to be in
your face so when people open that record they will then look at the comments
to see the details. Hope that made sense :-) Thaks for your help.
 
A very simple way to do this is to use a Wingdings graphic for the alert.

Assuming a field named Comments, you just add a text box with properties
like this:
Control Source =IIf([Comments] Is Null, Null, "E")
Font Name Wingdings
Font Size 72

Use the Character Map to select the font/symbol you want. If installed, this
Windows applet appears under:
Start | Programs | Accessories | System Tools.
 
On Mon, 18 Jan 2010 19:39:02 -0800, KerryInOz

I am assuming your form is in FormView. Put your graphic on the form
using an Image control. Then in the checkbox' AfterUpdate event write
this line:
Me.myImage.Visible = Me.myCheckbox.Value
(replace myObjectNames with yours)

Once you scroll to another record you probably want the image to be
shown as well when this (I am assuming) bound checkbox is selected. So
in the Form_Current event you repeat that line of code.

-Tom.
Microsoft Access MVP
 
Thanks, for the quick responses, you guys are great!!

I have tried both these options but cannot get either of them to work
properly - either the image is always there or it is not. I need the image
to appear if I tick the checkbox. If the checkbox is not ticked then there
should be no image. The 'Comments' field is separate, the image will point
to it to alert people of more information available.

I know I must be doing something wrong, just can't work out what it is :-(
 
KerryInOz said:
Thanks, for the quick responses, you guys are great!!

I have tried both these options but cannot get either of them to work
properly - either the image is always there or it is not. I need the
image
to appear if I tick the checkbox. If the checkbox is not ticked then
there
should be no image. The 'Comments' field is separate, the image will
point
to it to alert people of more information available.

I know I must be doing something wrong, just can't work out what it is :-(

Kerry,Set the Image to Visible No and enter a code in afterupdate of check
box and on current event on form
assuming ckbTopten ic your check box and lblTopten is your image.....Regards
Bob Vance

Private Sub ckbTopTen_AfterUpdate()
If ckbTopTen.value = True Then
lblTopTen.Visible = True

Else
lblTopTen.Visible = False
End If
End Sub
 
Back
Top