Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not access selected table
Message
From
23/07/1999 21:16:27
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00245546
Message ID:
00245632
Views:
14
>i have a form with a grid on it. the grid has multiple columns and some of the columns have a combobox control as the current control.
>
>all of the combobox controls have a rowsource type of 3 and the rowsource for each one is a seperate sql a select statement. the grid displays fine and the combocontrols work fine.
>
>my form also has a detail button on it which dynamically builds a detail form to allow editing of a single row from the grid. i do this by scanning thru the grid columns and using all of the property settings from the grid columns current control. i dynamically instantiate controls for the detail form and set the properties to place them as well as define the behavior based on what i read from the grid column.
>
>the problem that i am having is that when i close the detail form to go back to the form with the grid, i get the message can not access selected table. for some reason the cursor that drove one of the combobox controls gets closed.
>
>i am a bit stumped because there are multiple columns in the grid using this technique and only one column has the problem with the cursor closing. in fact, i have used this technique throughout my entire app and i only have a problem with one colum on a single grid.
>
>i can't figure out why or what to do...?
>
>thanks in advance for any insight.
>pbd

You should not use SQL-string as combo.rowsource here. Instead fire SELECT_SQL in code, get the cursor and use its alias as rowsource. Also, you will be safer if you clean combo.rowsource right before the abovementioned SELECT_SQL and relink it back after the SELECT.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform