"LAS" <(E-Mail Removed)> wrote in
news:i4mguc$da$(E-Mail Removed):
> But if my application works best to do some validation after all
> the data has been entered by the user (and there are some reasons
> for that sometime), how does one validate? I understand how to
> validate control by control, but my question is specifically how
> to deal with the failure if validation was in the before_update
> event of the form.
I would say that, as a general principle, validation is not often
best implemented at the record-level event.
One of the issues on which many disagree with me, however, is on the
question of using a single form for both adding and editing records.
I very often have a separate unbound form for adding new records,
and allow the creation of the new record only when the controls on
the unbound New Record form have been properly filled out. I don't
include all fields on the New Record form, only the ones that are
required to create a valid record.
This avoids a number of issues in the full detail form in that you
then need only validate in the events related to editing, and don't
have to worry about the insert events.
I know that I never get much in the way of support for this approach
when I describe it, but it has been the easiest way for me to
address these kinds of problems over the last 16 years I've been
developing in Access professionally.
I think it just overcomplicates your coding if you have to account
for both additions and editing in the same form.
--
David W. Fenton
http://www.dfenton.com/
contact via website only
http://www.dfenton.com/DFA/