Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Release not firing
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00309734
Message ID:
00309905
Views:
31
>>If I choose the menu option without giving the grid the focus, all works as planned. If I give the grid the focus, the first form is not released until after the second form has loaded. Since the second form uses the same view as the first, the view is released along with the first form. This causes the error 'Alias myview not found'.
>
>I assume by this error that you are not using private data sessions. When the 2nd form launches with a default datasession and AutoOpenTables set to true, this 2nd form uses the same DS as the first form. The 2nd form sees the view already open so does not open it again. The 1st form finally destroys itself, and in the process, closes all tables and views that were opened by the DE [because AutoCloseTables is set to true].
>
>Now I am not sure why the sequence is different based on what has focus in the 1st form, but your error of alias not found would be resolved by using private data sessions.
>
>Keep in mind, that many SET commands are scoped to each data session [See VFP Help on SET DATASESSION for the complete list]. In my base form subclass, I have all my SET commands in the form's LOAD event. e.g.:
>
>set talk off
>set deleted on
>set exclusive off
>set multilocks on
>etc...

I tried using private data sessions but that did not solve the problem. It is a very strange behaviour in that it only happens when the grid receives the focus. Since the second form loading is small and the view used is small, I set the AutoCloseTables to .f. in the first form. When the second form is released, the first form is recalled. Requery seems to satisfy my requirements.

Thanks for you help.

Greg O'Brien
Nordat Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform