On Friday, October 31, 2003, at 10:49 AM, Greg Gum wrote:
> I go one step being using either the Valid or LostFocus, and have a > method > called ISDATAVALID that the framework calls when it really is ready to > validate. If a user is canceling out of a form, then it never gets > called > so you don't get into the situation where the user wants to cancel, > but the > Valid() keeps putting the user back in a textbox. One way around this > is > checking for LastKey = 27 in your valid event, but I don't like having > to > remember to put that in every time.
What you are talking about is row-level validation, as opposed to field-level validation that fires from the Valid() event. In practice, I rarely use Valid(), since I don't usually need to validate a field independently of everything else. I too prefer keeping my validation in the business object, and validating a record as a whole, rather than field-by-field.
___/ / __/ / ____/ Ed Leafe http://leafe.com/ http://opentech.leafe.com
©2003 Ed Leafe |