hello !
im new here and to VB. and i need some help on input validation for text boxes that are linked to radio buttons... at the moment im using If..Then, if i should do something different let me know..
i have 24 text boxes linked to 8 radio buttons and i want to validate certain text boxes per radio, how is it done?????
If rad1.Checked And txt1.Text.Length Or txt2.Text.Length Or txt3.Text.Length Or txt4.Text.Length Or txt5.Text.Length < 1 Then
MessageBox.Show("Fill all boxes to read story", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ElseIf rad2.Checked And txt1.Text.Length Or txt2.Text.Length Or txt3.Text.Length Or txt4.Text.Length Or txt5.Text.Length Or txt6.Text.Length Or txt7.Text.Length Or txt8.Text.Length Or txt9.Text.Length < 1 Then
MessageBox.Show("Fill all boxes to read story", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ElseIf rad3.Checked And txt1.Text.Length Or txt2.Text.Length Or txt3.Text.Length Or txt4.Text.Length Or txt5.Text.Length Or txt6.Text.Length Or txt7.Text.Length Or txt8.Text.Length Or txt9.Text.Length < 1 Then
MessageBox.Show("Fill all boxes to read story", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ElseIf rad4.Checked And txt1.Text.Length Or txt2.Text.Length Or txt3.Text.Length Or txt4.Text.Length Or txt5.Text.Length Or txt6.Text.Length Or txt7.Text.Length Or txt8.Text.Length Or txt9.Text.Length Or txt10.Text.Length Or txt11.Text.Length Or txt12.Text.Length Or txt13.Text.Length Or txt14.Text.Length Or txt15.Text.Length Or txt16.Text.Length Or txt17.Text.Length Or txt18.Text.Length Or txt19.Text.Length Or txt20.Text.Length Or txt21.Text.Length Or txt22.Text.Length Or txt23.Text.Length < 1 Then
MessageBox.Show("Fill all boxes to read story", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ElseIf rad5.Checked And txt1.Text.Length Or txt2.Text.Length Or txt3.Text.Length Or txt4.Text.Length Or txt5.Text.Length Or txt6.Text.Length Or txt7.Text.Length Or txt8.Text.Length Or txt9.Text.Length Or txt10.Text.Length Or txt11.Text.Length < 1 Then
MessageBox.Show("Fill all boxes to read story", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ElseIf rad6.Checked And txt1.Text.Length Or txt2.Text.Length Or txt3.Text.Length Or txt4.Text.Length Or txt5.Text.Length Or txt6.Text.Length Or txt7.Text.Length < 1 Then
MessageBox.Show("Fill all boxes to read story", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ElseIf rad7.Checked And txt1.Text.Length Or txt2.Text.Length Or txt3.Text.Length Or txt4.Text.Length Or txt5.Text.Length Or txt6.Text.Length Or txt7.Text.Length Or txt8.Text.Length Or txt9.Text.Length Or txt10.Text.Length Or txt11.Text.Length Or txt12.Text.Length Or txt13.Text.Length Or txt14.Text.Length Or txt15.Text.Length Or txt16.Text.Length Or txt17.Text.Length Or txt18.Text.Length Or txt19.Text.Length Or txt20.Text.Length Or txt21.Text.Length Or txt22.Text.Length Or txt23.Text.Length Or txt24.Text.Length < 1 Then
MessageBox.Show("Fill all boxes to read story", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ElseIf rad8.Checked And txt1.Text.Length Or txt2.Text.Length Or txt3.Text.Length Or txt4.Text.Length Or txt5.Text.Length Or txt6.Text.Length Or txt7.Text.Length Or txt8.Text.Length Or txt9.Text.Length Or txt10.Text.Length Or txt11.Text.Length Or txt12.Text.Length Or txt13.Text.Length Or txt14.Text.Length < 1 Then
MessageBox.Show("Fill all boxes to read story", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Else