>When the user clicks to close the active form, I would like to prompt to save changes if any have been made to the current record. My close button is already aware of changes, and deals with the situation accordingly, but can I prevent the form from closing after the user clicks the 'x', if he/she selects cancel from the resulting messagebox?
>Restated: once the user clicks to close the form, can I negate that action?
The 'X' click calls the QueryUnload event on your form. In your method that closes the form return false if you do not want to close the form. Then put this code in the QueryUnload event.
IF NOT { call close method here}
NODEFAULT
ENDIF
HTH
GeneS
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