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--