patou316
New member
Hi. I currently have an If...Then statement that checks if all fields of a form have been filled before saving the info in a file. I'd like to be able to tell which field has not been filled to give the user a dynamic message (at the moment, it only tells them that the checklist is not completed ) :
Is there a way to determine which of these conditions is false without having to do a seperate If statement for each ?
VB.NET:
If ([B][FONT="Arial Black"]txtNoDemande.TextLength = 8 _
Or txtNoDemande.TextLength = 13 _
And txtDateLoad.TextLength <> 0 _
And txtNoDisplay.TextLength <> 0 _
And chk1.Checked And chkBak.Checked And chkWip.Checked[/FONT][/B]) Then
If rad1.Checked Then
valide = True
ElseIf rad2.Checked And txtNoMembres.TextLength <> 0 Then
valide = True
End If
End If
If valide Then
btnSubmit.Enabled = True
lblMessage.ForeColor = Color.DarkGreen
lblMessage.Text = "checklist remplie correctement, svp cliquer soumettre"
Else
btnSubmit.Enabled = False
lblMessage.ForeColor = Color.DarkRed
lblMessage.Text = "informations manquantes, svp remplir tous les champs"
End If
Is there a way to determine which of these conditions is false without having to do a seperate If statement for each ?