Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unloading form via toolbar
Message
De
02/09/2003 19:23:18
 
 
À
02/09/2003 14:51:44
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00825431
Message ID:
00825518
Vues:
22
Hi Alan,

To what is lnFormValue scoped? When you use the toolbar to close the form is the next line of code executed the same as when you use the form button?

pamela

>I wish to enable users to save changes and quit a modal form which returns a numeric value using the code 'DO MyForm TO lnFormValue'.
>
>If I close the form using a button on the form, the form's Unload() event returns a numeric value, as expected. The button's click() code is as follows...
>WITH thisform
> IF .save() && validate data and commit changes
> .release()
> ENDIF
>ENDWITH
>
>
>Ever on the lookout for a more generic solution, I would like the function to be called by a toolbar button instead of a button on the form. My toolbarbutton.click code is as follows...
>
>WITH _screen.activeform
> IF .save()
> .release()
> ENDIF
>ENDWITH
>
>This closes the form ok, but returns .F. instead of the expected numeric value, as if the unload() event is being bypassed. I have traced execution from when the toolbar button is pressed and form.unload definitely executes 'RETURN lnReturnValue' as its last line. lnReturnValue holds a numeric value, but .F. is returned to lnFormValue above!
>
>Has anyone any idea what may be going on here, and how I can solve this (frustrating) problem. Any help would be appreciated.
>
>Alan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform