>I am working on designing one of my first forms - yes I'm a newbie :) I put some code in the form's Init event, expecting the data enviromnent to be established at that time. I put a WAIT WINDOW command just after my code in form's Init, and the Data Session window did not show the data enviroment loaded with all the free tables specified in my form's DE. Oddly, on the next line (in Init) I did a SUSPEND. After suspending, the data environment is fully loaded. Maybe you can't truly suspend VFP in the form Init, as possibly some other events/methods fire before fully suspending?
>
>So my question is when does a form's DE get loaded, in relation to the many events/methods of a form?
>
>TIA,
>
>-Mike
>
>PS. Can anybody tell me why every time I post a new message to this Visual FoxPro forum, the drop down Category list contains non-VFP categories. I have to click Send, then get a message that I selected a nonexistent VFP category. Maybe this is a glitch because I use FireFox?
Here the events sequence as it described in VFP HELP:
Object Event that occurs
--------------------------------------------
Data environment BeforeOpenTables
Form set Load
Form Load
Data environment cursor(s) Init
Data environment Init
Objects Init
Form Init
Form set Init
Form set Activate
Form Activate
Object1 When
Form GotFocus
Object1 GotFocus
Object1 Message
Object1 Valid
Object1 LostFocus
Object2 When
Object2 GotFocus
Object2 Message
Object2 Valid
Object2 LostFocus
Form QueryUnload
Form Destroy
Object Destroy
Form Unload
Form set Unload
Data environment AfterCloseTables
Data environment Destroy
Data environment cursor(s) Destroy
But to be sure that DE is opened you tables you must check if you set AutoOpenTables property of DE to .t.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.