Yes/No check box Condition

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form in which the user selects a check box for yes.

Problem: I want 2 other fields to appear when this check box is checked and
disappear when the check box is not check.

Please help.
Thank you,
Monster
 
I have a form in which the user selects a check box for yes.

Problem: I want 2 other fields to appear when this check box is checked and
disappear when the check box is not check.

Please help.
Thank you,
Monster

Code the check box control's AfterUpdate event, as well as the Form's
Current event:

[ControlA].Visible = [CheckBoxName] = -1
[ControlB].Visible = [CheckBoxName] = -1
 
Code the check box control's AfterUpdate event, as well as the Form's
Current event:

[ControlA].Visible = [CheckBoxName] = -1
[ControlB].Visible = [CheckBoxName] = -1

Or the following which is clearer (IMHO)

If [CheckBoxName] = True Then
[ControlA].Visible = True
[ControlB].Visible = True
Else
[ControlA].Visible = False
[ControlB].Visible = False
End If

Tom Lake
 
Thank you both my problem was fixed. And so that none of you feel bad I used
one method in one form and the other method in the other form and they both
work!

Tom Lake said:
Code the check box control's AfterUpdate event, as well as the Form's
Current event:

[ControlA].Visible = [CheckBoxName] = -1
[ControlB].Visible = [CheckBoxName] = -1

Or the following which is clearer (IMHO)

If [CheckBoxName] = True Then
[ControlA].Visible = True
[ControlB].Visible = True
Else
[ControlA].Visible = False
[ControlB].Visible = False
End If

Tom Lake
 
Back
Top