Making an unbounded object be visible only if a checkbox is checke

V

Verver

Hi,
I've got a really important issue.
I need the Access to display on the form a certain image or text if the
checkbox is checked and some other image or text if it is not checked.
I would appreciate you help and quick answer beacuse I am pretty out of time
Thank you
 
L

Linq Adams via AccessMonster.com

In Form Design View, select the control for the text/image to be displayed if
the checkbox is checked (called ControlIfChecked in this example) and goto
Properties - Format and set its Visible Property to No.

Then use this code:

Private Sub CheckBox_AfterUpdate()
If Me.CheckBox = -1 Then
Me.ControlIfChecked.Visible = True
Me.ControlIfNotChecked.Visible = False
Else
Me.ControlIfChecked.Visible = False
Me.ControlIfNotChecked.Visible = True
End If
End Sub

Private Sub Form_Current()
If Me.CheckBox = -1 Then
Me.ControlIfChecked.Visible = True
Me.ControlIfNotChecked.Visible = False
Else
Me.ControlIfChecked.Visible = False
Me.ControlIfNotChecked.Visible = True
End If
End Sub

That's all it takes.

Good luck!
 
Top