Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Limiting number of open lookup tables
Message
From
21/02/1999 15:17:35
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00189807
Message ID:
00189816
Views:
26
>I have a form with which uses a large number of drop down combo-lists for data selection/validation. The form is a multi-page frame form and my preference would be to only load the look-up tables when a particular page is selected. I am maintining data compatibility with a DOS FoxPro application - so need to use free tables and the number of file handles becomes an issue in that it limits the number of concurrent users logged onto the system at any one time. I will need to remove the look-up tables from the data environment - when and where should I open these tables? - if I do not load the table until the control is active - the control appears blank until selected.
>
>Thanks in advance for any advice.

Doing this, you will need to set the combo's rowsource property dynamically as well. So the complete code for this might go something like:

Control.GotFocus

USE Mysource IN 0
THIS.RowSourceType = 2 && Alias
THIS.RowSource = "MySource"

COntrol.GotFocus
THIS.RowSourceType = 1 && Value
THIS.RowSource = THIS.Value && make the only thing in the list what is already the value

You will have to do some finagling at the form startup to get all this initialized as well. When a listbox's value can't be found in it's rowsource, it shows blank. You also might be better off unbinding the lists and assigning/reading the values programmatically.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform