Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird form problem
Message
 
To
19/09/2001 18:01:49
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00558527
Message ID:
00558611
Views:
15
>Dear friends:
>
>I have a form that is doing something weird, First of all I am using this form as a List Browser so the Form contains a ComboList that gets populated on the fly, I call it using parameters something like Do Form List with "clients" to ClientsList where clients is the table to open, and ClientsList the variable to reference to this form, anyway, everything functions perfectly with my form except when I create several instances of the same form with different tables
>like...
>
>Do Form List with "users" to UserssList
>Do Form List with "items" to ItemsList
>
>Sometimes (Just sometimes) I get an error message that says "Can not access the table". The weird thing is that I have an ON ERROR routine but this routine is being bypassed??? and also I have specified in the CloseTables Property of the Datasession to False. And I never close any table in my code.
>
>Another weird thing is that if I use the debbuger I can not see the object that I create instantly like with any other form so I have to hide the Window that displays the objects and redisplay it so it can show my new objects, and this happens only with this form.
>
>I always create a new unique variable for a new instance of the form and I always change the THISFORM.NAME property to a unique name.
>
>¿What could there be wrong?
>
>Thanks in advance for your help.
>
>
>Sincerely,
>
>Mao

Mao,

If you do a research on "Cannot access selected table" here in the UT, you'll find lots of interesting things.
Basically, the destroy event of a container fires before the destroy event of its contained objects. So the dataEnv gets killed before your list object. Something refreshes your list control which reevaluates its controlsource. And since the controlsource is away...


There are several techniques to avoid that. You could kill your list object in the destroy or probably set its controlsource to "".

José
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform