Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flaky listbox
Message
From
12/11/1999 12:30:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
12/11/1999 12:10:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00290632
Message ID:
00290637
Views:
26
>I am having trouble with a listbox.
>
>The listbox is on page 2 of a pageframe. Page 1 contains a parent records. Page 2 contains a child record. (Each parent has 3 or 4 child records.) When you click on the page 2 tab, the Activate method does a SELECT statement to get an identifying field from the child table to populate the listbox.
>
>At first I copied the records to an array for the listbox. Sometimes the listbox displayed all of the elements and sometimes not. When I got it to display all (I'm not sure how) I created an EXE file. When I ran the EXE from outside of VFP the listbox looked blank. I could click on it and the CLICK METHOD would execute for each element of the array, but the values of the array did not appear in the list box.
>
>I then tried to display the values of the selected table in the listbox. When I go to records from page 1 and then click on page 2 in a particular sequence (this sequence includes going to a particular record based on choosing a particular value in a drop-down list on page 1, but I can choose the value in a different sequence and the error does not occur) I get the following error:
>
>Cannot access the selected table (Error 1152)
>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.
>
>The error does not occur when I remove the offending listbox. I have about 100 variables mostly in arrays. If I put "=timeout(2)" as the first command in the Activate method, the error occurs EVERY TIME.


I couldn't clearly understand if rowsource is an array or not but sounds like listbox rowsource is a cursor and you try to make an SQL into that cursor. SQL cannot access the table/cursor if listbox uses it. If elements is SQL selectable then directly make SQL the rowsource and Rowsourcetype = 3-SQL. You could repopulate the listbox by executing a listbox.requery.
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