Hi
First please understand I am new to VB and I am trying to learn, I have 12 CheckBoxes on an option form that toggle TextBoxes on and off if applicable, insert text, and cause frames to be visible on other forms. The problem is that using the code listed below the first check box works fine, as expected however the second CheckBox when checked also does what it is suppose to but when unchecked it remains as if it were still checked, and the same with the remaining boxes. they will all activate when checked but they will not change when unchecked.
If (CheckBox1.Value = Checked) Then
TextBox1.Visible = True 'enables the site name field
TextBox1.Text = "Site 1" 'adds the text Site 1 to the text box
CheckBox2.Enabled = True 'enables the next field
frmUser1!frame_ch1.Visible = True 'enables the main user module
ElseIf (CheckBox1.Value = Unchecked) Then
TextBox1.Visible = False
CheckBox2.Enabled = False
frmUser1!frame_ch1.Visible = False
End If
I used generic name to help out, please halp if you can and please recommend and good books I should purchase.
Thanks
Randy
First please understand I am new to VB and I am trying to learn, I have 12 CheckBoxes on an option form that toggle TextBoxes on and off if applicable, insert text, and cause frames to be visible on other forms. The problem is that using the code listed below the first check box works fine, as expected however the second CheckBox when checked also does what it is suppose to but when unchecked it remains as if it were still checked, and the same with the remaining boxes. they will all activate when checked but they will not change when unchecked.
If (CheckBox1.Value = Checked) Then
TextBox1.Visible = True 'enables the site name field
TextBox1.Text = "Site 1" 'adds the text Site 1 to the text box
CheckBox2.Enabled = True 'enables the next field
frmUser1!frame_ch1.Visible = True 'enables the main user module
ElseIf (CheckBox1.Value = Unchecked) Then
TextBox1.Visible = False
CheckBox2.Enabled = False
frmUser1!frame_ch1.Visible = False
End If
I used generic name to help out, please halp if you can and please recommend and good books I should purchase.
Thanks
Randy