T
TinaR
I'm working with Access 2007.
I have a combo box on my form with three items to choose from in the drop
down. I then have two check boxes that I want to be visibile only if the
user selects the 2nd or 3rd item in the drop down. If they choose the first
item in the drop down, I want the check boxes to disappear. I put my IF
Statement in the combo box's AfterUpdate event. It works except that the
checkboxes are either visibile or not visible in ALL of the records. How do
I keep the checkboxes visible or invisible for each record? Not sure what
I'm doing wrong. Below is my code:
Private Sub cbo1_AfterUpdate()
If.Me.cbo1 <> "Item1" Then
Me.Label1.Visibile = True
Me.ck1.Visible = True
Me.Label2.Visibile = True
Me.ck2.Visibile = True
Else
Me.Label1.Visibile = False
Me.ck1.Visible = False
Me.Label2.Visibile = False
Me.ck2.Visibile = False
End If
End Sub
Thanks for your help!
Tina
I have a combo box on my form with three items to choose from in the drop
down. I then have two check boxes that I want to be visibile only if the
user selects the 2nd or 3rd item in the drop down. If they choose the first
item in the drop down, I want the check boxes to disappear. I put my IF
Statement in the combo box's AfterUpdate event. It works except that the
checkboxes are either visibile or not visible in ALL of the records. How do
I keep the checkboxes visible or invisible for each record? Not sure what
I'm doing wrong. Below is my code:
Private Sub cbo1_AfterUpdate()
If.Me.cbo1 <> "Item1" Then
Me.Label1.Visibile = True
Me.ck1.Visible = True
Me.Label2.Visibile = True
Me.ck2.Visibile = True
Else
Me.Label1.Visibile = False
Me.ck1.Visible = False
Me.Label2.Visibile = False
Me.ck2.Visibile = False
End If
End Sub
Thanks for your help!
Tina