Ok , would you like to use an errorprovider, cause it is better rather than to show a pop-up message everytime a user writes wrong, info. and an errorprovider gives a lot of room for mistakes, wihtout giving off too many msgboxes.
add this on every txtbox
- if txtbox1.text=nothing then
-
errorprovider1.seterror(txtbox1, "Txtbox must b\not be left blank!")
-
e.cancel'
w/c tells a user that he must place a valid value in the 1st txtbox before he can leave and jump to another txtbox.
add this to the 2 lines above
- elseif
-
errorprovider.seterror(txtbox1,"")
-
'which lets the user jump to another txtbox if the user entere a right txt or number
-
-
end sub
add this code to every txtboxes you have for validation purposses.
actually you can still add validating and validated event handler to every txtbox.
hope this may help ya...