Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot Access the selected table - Error
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00755918
Message ID:
00756060
Views:
12
You're killing listbox recordsource cursor why listbox still uses it. Try to set listbox Rowsource to empty string before query is run and restore after.

>This has reared its ugly head again, I thought I had it fixed, But I don't
>think so.
>
>I have a cursor (Select.... ) that populates a Listbox. in a method in a
>form
>Rowsourcetype = 6
>Rowsource is a variable (cRowSource) which switches between 2 fields based
>on how the user wants the column order to display in the Listbox.
>i.e. cRowSource = IIF(!THISFORM.VISIBLE,"rentalcursor.agree_num,cust_name",;
> IIF(THISFORM.reg_listbox1.ROWSOURCE = "rentalcursor.agree_num,cust_name",;
> "rentalcursor.agree_num,cust_name",;
> "rentalcursor.cust_name,agree_num"))
>
>Before, when a child form was calling this method I would get the "Cannot
>...." error, but I fixed it, Now when I add a record and this method is
>called, the whole form goes blank, the listbox is invisible (normal behavior
>for this error), but when I click the 'OK' button on the error dialogue,
>everything is back to normal and the new record displays in the listbox
>
>In the debug window, I can see the cursor is created and is selected before
>the Listbox is initialized
>
>The help (not very helpful)
>"You have attempted to select a table outside the 32K work area range or are
>attempting to reference a file variable in a table that is not open."
>
>This has been driving me batty for the last 3 hours, Anybody have any ideas
>
>Thanks
>
>Mohammed
>www.imaginecorp.com/whatwedo.htm
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform