Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Odd behaviour with form return value
Here's an odd one which I cannot explain...
I need to store a form's return value to a variable, which I do using the following code...
LOCAL lnFormValue
lnFormValue = .NULL.
DO MyForm TO lnFormValue && MyForm is a modal form
If I close the form by clicking on the cross in the top-right of the window, everything works ok and I end-up with the expected value for lnFormValue. However, if I close the form via a toolbar button, the resulting value of lnFormValue is still .NULL., and the form value is lost.
The close button Click() code is...
LOCAL loForm
loForm = _screen.activeform && form object reference
IF loForm.QueryUnload()
loForm.Release()
ENDIF
The Form.Unload() code contains
RETURN thisform.returnvalue
and I have checked that this code is being executed before control returns to the calling procedure.
Has anyone any idea how I can get my return value when closing the form via. a toolbar button? Any help would be appreciated.
Alan
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