Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Communicating between beforeopentables event and form
Message
From
29/07/1999 16:13:11
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgia, United States
 
 
To
29/07/1999 15:04:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00247888
Message ID:
00247938
Views:
16
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform