Visual Basic .NET » Web Forms
If Statement with multiple controls -- jpr --


Hello,

I have a form with multiple controls (textboxes) named:
Father Mother Child1 Child2

On the form there are also two checkboxes (check1 and check2).

I am using the following statement for each control and placed in in the OnCurrent event of my form:
If Not IsNull (Me.Fater) Then Me.Check1 = "YES" (or -1)
Me.Check2.Value = False End IF

Is there a way I can write one If statement saying:
If all controls Father, Mather, Child1 and Child2 or at least one of them has data, then Check1 should be selected and check2 emply. If all controls do not have data then ckeck1 should be empty and check2 selected.

Thank you.

[Submit Comment]Home