Information générale
Catégorie:
The Mere Mortals Framework
If your Save button is a class of its own (it should be), and you form is subclassed (it should be too), add code to the save button to run a form method Thisform.m_ValidSave. The method can test everything, and add error meesages to a Chr(13) delimiter string. If any errors are fatal (meaning you mustn't allow user to save changes) then tell him/her what's up and don't allow save. Otherwise tell him its a warning (I do this in the MessageBox title), and save anyway... (If the errors are fatal, I ask if s/he wants to lose changes in messagebox).
Any form with no need for this validation just won't have any code in the m_ValidSave method.
Adam
Précédent
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