Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataEnvironment Methods?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00020842
Message ID:
00021140
Views:
59
>>>I have a form which use the data environment and AutoOpen is .T. and the form has data bound controls. If another users opens a table(s) contained in the DE of my form exclusively my form will not function. The problem is how do I trap this condition. I have reviewed the error event within the DE without success. I need a quick fix since I have many forms setup with the DE and AutoOpen=.T.. Please point me in the right direction if there is one. tia steve
>>
>>on error lErroflag=.t.
>>do form ... && your form called here
>>on error
>>if lErrorflag=.t.
>>**** your message (you can use AERROR() here)
>>endif
>
>I now know why I investigated other avenues... I am using the BeforeOpen event in the DE to create some cursors which are used to populate some lists on the form. When I get an error in the DE I am asked to select a table before it continues... I am going to see If I can place the BeforeOpen code into either the Load or INIT of the form. I have to check the firing order again... I know it is different when AutoOpen is true than when .f.. Well, if you have any insight to the BeforeOpen stuff I am all ears...

I used to create cursors in Form.Init. In this case you better have empty RowSources for Listboxes in designer mode and fill them after cursor will be created.
Re: AutoOpen. If AutoOpen=.f., BeforeOpenTables event will not be fired at all.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform