When a checkbox is clicked a image appears until check mark is unclicked

pdavis27040

Registered User.
Local time
Today, 06:28
Joined
Apr 10, 2003
Messages
18
Hi everyone

Is there a way when a person clicks on a checkbox that in the upperportion of the form or on the side words will appear or an image?

For example the 4 checkboxes are
Approved
Declined
VIP
Barred

When someone clicks on the VIP checkbox a VIP image or lettering comes up at the top or side of the form and stays there until unchecked.

I do appreciate it!!!
 
The checkbox control has an AfterUpdate event procedure that you can use to make text display.

For example, if you have an invisible label named "MyLabel" then (from the AfterUpdate event proc):

MyLabel.Captiion = "VIP"
MyLabel.visible = true

Will display the "VIP" text.

You'll probably also want to set the label caption property from your form OnCurrent event procedure depending on which checkbox is checked on the current record.

Hope this helps,
 
OnCurrent ???

When you say OnCurrent what exactly do you mean or where is this set at?
 
Add a label where you want the text to appear, I'll call it "lblMyLabel".

In the "AfterUpdate" event for each of the check boxes, add the following code:

Code:
Private Sub chkMyCheckBox1_AfterUpdate()

     If Me![chkMyCheckBox1].Value = True Then
        Me![lblMyLabel].Caption = "Text 1"

     End If

End Sub

You could also have a diferent label/image for each entry and have them hidden by default, and show them whenb the check box is ticked.

Hope this helps...
 

Users who are viewing this thread

Back
Top Bottom