Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error: Cannot access selected table
Message
From
26/09/2002 00:23:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00704557
Message ID:
00704559
Views:
19
>I keep getting the error "Cannot access selected table" in an application I'm working on. The problem occurs with a listbox that is bound to a cursor created inside the control's Requery method. Any ideas?

If you're trying to write over same cursor it's incaccessible. You should set your rowsource to query and call listbox.requery. Maybe you don't need a query rowsource but just an SQL one. ie:
with myListBox
 .RowSourceType = 3 && SQL
 .RowSOurce = "select myfield1, myfield2 from myTable "+;
              " where myCriteria "+;
              " order by myField2" +;
              " into cursor crsLookup"
 .Columncount = 1 && Assuming you don't even want to show 2nd
endwith
myListBox.requery() && Would reload
Cetin

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform