hi i have a form called "dieta" which have 5 combo boxes "ctl1" "Ctl2" "Ctl3" "Ctl4" "Ctl5" all of them are not visible exept the ctl1. I want when then "ctl1" takes the value "small" the ctl2 be visible else when the Ctl1 takes the value "big" then Ctl3 be visible and all the others not visible.Now when ctl3 is visible and takes the value "one" then the ctl4 be visible and all the others not visible, else when the ctl3 takes the value"two" then the Ctl5 be visible and all the others be not. i have this code:
Private Sub Ctl1_AfterUpdate()
If Ctl1.Text = "small" Then
Ctl2.Visible = True
Ctl3.Visible = False
ElseIf Ctl1.Text = "big" Then
Ctl2.Visible = false
Ctl3.Visible = true
End If
End Sub
Private Sub Ctl3_AfterUpdate()
If choose.Value = "one" Then
Ctl4.Visible = True
Ctl5.Visible = False
ElseIf choose.Value = "two" Then
Ctl4.Visible = False
Ctl5.Visible = True
End If
End Sub
the code works fine for the ctl1 but when i 'm trying to select values from the Ctl3 it does nothing
why?
Can you please help me?thanx...
Private Sub Ctl1_AfterUpdate()
If Ctl1.Text = "small" Then
Ctl2.Visible = True
Ctl3.Visible = False
ElseIf Ctl1.Text = "big" Then
Ctl2.Visible = false
Ctl3.Visible = true
End If
End Sub
Private Sub Ctl3_AfterUpdate()
If choose.Value = "one" Then
Ctl4.Visible = True
Ctl5.Visible = False
ElseIf choose.Value = "two" Then
Ctl4.Visible = False
Ctl5.Visible = True
End If
End Sub
the code works fine for the ctl1 but when i 'm trying to select values from the Ctl3 it does nothing
why?
Can you please help me?thanx...