Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Populate combobox
Message
 
 
To
20/12/2001 18:54:12
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00597089
Message ID:
00597094
Views:
14
Hi Inge,

You can use SQL Select as a RowSource by setting following properties
RowSourceType=3 - Sql Select
RowSource="SELECT descr FROM myTable INTO CURSOR crscmbBox"
>What is the best practice to populate a combobox in a form class?
>I had been using a SQL select statement into array:
>
>SELECT descr FROM myTable INTO ARRAY aArray
>THISFORM.cmbBox.RowSourceType=5
>THISFORM.cmbBox.RowSource='aArray'
>USE IN _myTable
>
>Is there a better way?
>I'd like to put the above code in THISFORM.cmbBox.Init().
>But cannot seem to work right. cmbBox comes up with empty list.
>Maybe because aArray is not scoped accross the form class?
>Where do I need to declare aArray?
>Do you think it does not work because aArray is in cmbBox.Init() & lost its value once the Init() process is done?
>
>Thank you all!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform