I am validating user input in my form. I am coding msgbox if any text box is blank. I am also checking for integers etc. Every time the msgbox line executes and user clicks ok, I want them to view the form and be able to enter a new input. My problem is that my program continues running.
My code is:
If (txtFrom.Text = "" Or txtTo.Text = ""
Then
MsgBox ("You didn't enter a valid input"
Else
If (IsNumeric(txtSynthFrom.Text) And IsNumeric(txtSynthTo.Text)) Then
specifiedFrom = txtFrom.Text
specifiedTo = txtTo.Text
Else
MsgBox ("You didn't enter a number"
End If
End If
I thought this was pretty simple code. Am I missing something?
My code is:
If (txtFrom.Text = "" Or txtTo.Text = ""
MsgBox ("You didn't enter a valid input"
Else
If (IsNumeric(txtSynthFrom.Text) And IsNumeric(txtSynthTo.Text)) Then
specifiedFrom = txtFrom.Text
specifiedTo = txtTo.Text
Else
MsgBox ("You didn't enter a number"
End If
End If
I thought this was pretty simple code. Am I missing something?