Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox: Cannot access selected table
Message
 
To
27/05/1996 13:32:01
Charles Fleming
Alba Computing Services
Edmonton, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00001657
Message ID:
00001677
Views:
45
>I have a form with a listbox populated by a SQL
>SELECT statement with a condition. The cursor for
>the listbox is created manually in the Load of the
>form, then updated via the Requery method of the
>listbox whenever the user selects any of the
>options in a specific option group (the value of
>which sets the condition for the SELECT).
>
>The lsitbox is initially disabled and the value
>for the option group is initially empty.
>
>The very first time the user tries to set the
>value in the option group (which will enable the
>listbox), the requery method generates the message
>"Cannot access selected table". Observing the
>process with the Debug window, it appears that the
>cursor is initially in a 99999999.TMP file, the
>file number changing every time the Requery runs -
>except the first time, when it tries to put the
>cursor into the same file name (although that may
>be the result of selecting OK from the error
>message).

Charles

Sometimes we (me) overlook the obvious...

In the Controls INIT you new to specify the rowsource. Here is my code:


this.rowsource = ;
'select &lcLUFields ;
from &lcLUTable ;
&lcSQLWhere ;
into cursor &lcLUCursor ;
order by &lcLUKeyField'


Sorry Charlie...
Tom
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Previous
Reply
Map
View

Click here to load this message in the networking platform