Information générale
Catégorie:
Codage, syntaxe et commandes
To add to what Mike said, you should keep the error traping code in the Error() method of the form, but remove the ON ERROR in the Click() event of the button. The current object Error() method is allways the first method fired after an error has occured. The ON ERROR may prevent the form from closing by keeping a reference to it.
>In the beginning of a the click procedure I have:
>ON ERROR DO ERROR WITH ERROR()
>
>In the error procedure I have:
>THISFORM.RELEASE
>
>I have 'THISFORM.RELEASE' because I want to close the current form and have focus go to the form that was previously in focus. But, the current form is not released and the click procedure continues on after the error. How can I stop this procedure?
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