best way to validate data in forms; 2010

  • Thread starter Thread starter cate
  • Start date Start date
C

cate

I know how to use validation in cells and I know how to build basic
forms. (lol - aren't I smart).

What's the best way to validate data entered from a form. I don't
want anything getting on a sheet that isn't valid. I need the user to
fix everything before the save is executed.

So far it looks like a lot of coding to accomplish this. How is this
generally done? How do you pros do it?
Validation would cover numeric ranges, dates, ... standard stuff I
guess.

Thank you.
 
cate said:
I know how to use validation in cells and I know how to build basic
forms. (lol - aren't I smart).

What's the best way to validate data entered from a form. I don't
want anything getting on a sheet that isn't valid. I need the user to
fix everything before the save is executed.

So far it looks like a lot of coding to accomplish this. How is this
generally done? How do you pros do it?
Validation would cover numeric ranges, dates, ... standard stuff I
guess.

Thank you.

'------------------------------------------------

sub button_ok
if validate () then unload me

end sub

'--------------------------------------------------
function validate as boolean



if txt.value == "" then

msgbox "txt cannot be empty"
txt.setfocus
exit function


if ....... then

end if


validate = true

end function

'----------------------------------------
 
Back
Top