Adamhumbug
New Member
- Joined
- Feb 16, 2015
- Messages
- 26
Hi All,
I have lots of forms with checkboxes on them. When the used clicks the checkbox, it makes a text box visible.
Currently i am putting the following code on every checkbox and changing the checkbox number and textbook number it refers to. Is there a better way of doing this than pasting it to every checkbox.
Thanks
Adam
I have lots of forms with checkboxes on them. When the used clicks the checkbox, it makes a text box visible.
Currently i am putting the following code on every checkbox and changing the checkbox number and textbook number it refers to. Is there a better way of doing this than pasting it to every checkbox.
Thanks
Adam
Code:
If CheckBox1.Value = True ThenTextBox1.Visible = True
End If
If CheckBox1.Value = False Then
TextBox1.Visible = False
End If
If CheckBox1.Value = True Or CheckBox2.Value = True _
Or CheckBox3.Value = True Or CheckBox4.Value = True _
Or CheckBox5.Value = True Or CheckBox6.Value = True _
Or CheckBox7.Value = True Or CheckBox8.Value = True _
Or CheckBox9.Value = True Or CheckBox10.Value = True _
Or CheckBox11.Value = True Or CheckBox12.Value = True _
Or CheckBox13.Value = True Or CheckBox14.Value = True _
Or CheckBox15.Value = True Or CheckBox16.Value = True _
Or CheckBox17.Value = True Or CheckBox18.Value = True _
Or CheckBox19.Value = True Or CheckBox20.Value = True _
Or CheckBox21.Value = True Or CheckBox22.Value = True _
Or CheckBox23.Value = True Or CheckBox24.Value = True _
Or CheckBox25.Value = True Or CheckBox26.Value = True _
Or CheckBox27.Value = True Or CheckBox28.Value = True _
Or CheckBox29.Value = True Or CheckBox30.Value = True _
Or CheckBox31.Value = True Or CheckBox32.Value = True _
Or CheckBox33.Value = True Or CheckBox34.Value = True _
Or CheckBox35.Value = True Or CheckBox36.Value = True _
Then
Me.Label16.Visible = True
Else
Me.Label16.Visible = False
End If