JJ said:
Which is better, to use this in the table or in the form that feeds
into the table? Or, do I have to do both? I have not even
ventured into any "before update" events. I really am green at
this, and trying to teach myself.-- JJ
That is a good question.
I think that engine level validation - i e having the database engine
do the validation, as we're doing here, is probably the only way to
be 100% sure there's no bad data in the table.
Then, the common opinion around here is that one should never allow
the users direct access to tables and queries, but give them forms
and reports to maintain and view the information, using form or
control events should be enough. When getting "the hang of it", it's
often easier to make more user friendly validation with form coding
Lot of developers will use both, depending on the requirements.
Engine level validation, to ensure no bad data is entered into the
table, and form level validation to pick up errors when entering
information through forms.
It's not unusual that you'll need to enter/alter information in(to)
the table in other ways than through forms. For instance from other
applications connecting to your database table, through action
queries etc..., in which case form level validation won't stop bad
data, but engine level validation will.
So, I think the requirements should decide. Sometimes one is to be
preferred over the other, sometimes one will need both to ensure
sufficient integrity.