Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Since control never really leaves the control when Ctrl+S is pressed, the valid event will not fire first.
I recommend setting up a form-level validation method that is called when a save is requested. The validation routine will check all fields, possibly based on a property in the hosting control(s). If a field is invalid, focus is set to the control and the Save is denied.
Another advantage of this is that users can freely move through all fields for heads-down processing before having to stop to correct some data. You can still have individual controls call the validation method, if desired.
If this approach does not work for you, try executing the control's valid event as follows:
thisform.activecontrol.valid()
Hope this helps.
Greg Willcockson
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement