Isaac
Lifelong Learner
- Local time
 - Yesterday, 23:26
 
- Joined
 - Mar 14, 2017
 
- Messages
 - 11,701
 
Well, it depends on which object's "update" we're talking about.  If you choose to perform your validation immediately after someone enters something in the control, then the control's AfterUpdate event is perfectly reasonable.  (Which is what I think you were actually talking about in your earlier post).  If you choose to perform your validation on the Form level, then the Form's BeforeUpdate is where you want to be...To me anyway.
It just depends on when you would rather do the validation. Which can depend on how complex the form is, how long it takes to fill out, and how "soon" you want your user to know that what they have entered is invalid.
For example, if I was filling out an sales Order form, and there was a zip/postal code field, and if it could be determined by code that the postal code I'd entered was a "we don't do business here" code, I'd like to know right away (!), before I take the trouble of filling out the whole thing - thus the control's AfterUpdate event might make perfect sense. Even if there is a slight duplication required by having to have it on the form's BeforeUpdate event as well. It all depends on timing, effort and business process how it will come across to the user whether validation failure messages can wait until the very end to show, or whether they'd benefit from showing earlier, too.
Adding one thing I have done in the past. When doing validation on numerous controls, in the form's BeforeUpdate event, changing the color (maybe to red) of any control that fails validation is a nice touch. Helps the user quickly spot problems, and aligns with behavior they're used to from webpages and other apps.
 It just depends on when you would rather do the validation. Which can depend on how complex the form is, how long it takes to fill out, and how "soon" you want your user to know that what they have entered is invalid.
For example, if I was filling out an sales Order form, and there was a zip/postal code field, and if it could be determined by code that the postal code I'd entered was a "we don't do business here" code, I'd like to know right away (!), before I take the trouble of filling out the whole thing - thus the control's AfterUpdate event might make perfect sense. Even if there is a slight duplication required by having to have it on the form's BeforeUpdate event as well. It all depends on timing, effort and business process how it will come across to the user whether validation failure messages can wait until the very end to show, or whether they'd benefit from showing earlier, too.
Adding one thing I have done in the past. When doing validation on numerous controls, in the form's BeforeUpdate event, changing the color (maybe to red) of any control that fails validation is a nice touch. Helps the user quickly spot problems, and aligns with behavior they're used to from webpages and other apps.