Validation without Focus

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The only way to fire the validation event for a control seems to required
that control receive the focus first. This only works if the user is good
enough to visit each control. What happens if they try to close the form
before they have visited other controls, but they are not yet valid? There
should be a way to invoke validation, but I can find anything like it in the
documentation. Thanks.
 
You have to walk the list of controls on the form (and controls in controls
like frames etc.), setting each one in turn to have focus and then trigger
Validating event by calling form's Validate method.
 
Back
Top