D
DawnTreader
Hello All
i have 6 forms that i need to validate when people enter in a new record to
those forms. when the user "saves" the record and closes the form i want to
do a double check to make sure that fields are not empty and have the correct
data in them. for instance i want to make sure that dates are entered as to
when the record happened, and some records require 2 dates that must be in
sequence.
i have been doing this on an individual form basis, but i am looking at the
amount of things i am having to code and wondering if there is a way to mark
fields on a form as part of the validation process and then pass the fields
and the data to a public routine or function that would figure out the
validity of the record and then get the user to fix the data.
i was thinking that if my function had a variant variable that was passed by
the form with the fields that were required then the function would check to
see if they were null and then either it would tell the user what fields were
missing data or send back a "go ahead, save and close" to the form.
i thought that this would save me code, but i dont know if it is a good idea
or how to go about it if it is a good idea.
any suggestions?
i have 6 forms that i need to validate when people enter in a new record to
those forms. when the user "saves" the record and closes the form i want to
do a double check to make sure that fields are not empty and have the correct
data in them. for instance i want to make sure that dates are entered as to
when the record happened, and some records require 2 dates that must be in
sequence.
i have been doing this on an individual form basis, but i am looking at the
amount of things i am having to code and wondering if there is a way to mark
fields on a form as part of the validation process and then pass the fields
and the data to a public routine or function that would figure out the
validity of the record and then get the user to fix the data.
i was thinking that if my function had a variant variable that was passed by
the form with the fields that were required then the function would check to
see if they were null and then either it would tell the user what fields were
missing data or send back a "go ahead, save and close" to the form.
i thought that this would save me code, but i dont know if it is a good idea
or how to go about it if it is a good idea.
any suggestions?