I have a form with several text boxes and I'm using the following code for validation, which seems to work fine.
If txtName.Text= "" Then _
MsgBox "You must enter a name."
If txtCity.Text= "" Then _
MsgBox "You must enter a city."
...
Problem is if someone forgets to enter text in just one box, it wipes all the data out of the other boxes and they have to start all over. How do I get past this?
If txtName.Text= "" Then _
MsgBox "You must enter a name."
If txtCity.Text= "" Then _
MsgBox "You must enter a city."
...
Problem is if someone forgets to enter text in just one box, it wipes all the data out of the other boxes and they have to start all over. How do I get past this?