Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Communicating between beforeopentables event and form
Message
De
29/07/1999 16:13:11
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgie, États-Unis
 
 
À
29/07/1999 15:04:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00247888
Message ID:
00247938
Vues:
21
>I have code in the beforeopentables event of the dataenvironment that changes the cursorsource to use the correct path and table. The code basically gets the path name from a table based on the alias name of the cursor. I need to put some error handling in this code and if an error occurs, I need to close down the form. Is it possible to do this? Is there a better way to get the correct cursorsource for a table? I am using free tables due to FPW2.6 legacy applications sharing the same tables.
>
>
>TIA

If there is an error, store a string value ("ERROR" for example) in the Datasession.tag Then put code like this in the LOAD of the form...
IF ALLTRIM(This.DataSession.Tag) = "ERROR"
RETURN .F.
ENDIF

Returning .F. from the LOAD event prevents the form from being created. Note that the Destroy event will not fire.

David.
David.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform