SELECT dist(compcode) FROM DBF() INTO ARRAY thisform.aCompCode this.Requery()the combo1 has these properties set at design time
RowSource = thisform.aCompCode RowSourceType = 5 - ArrayYou can also make the array a property of the combo1 itself if you use a subclass of ComboBox. In which case you'd change to something like:
SELECT dist(compcode) FROM DBF() INTO ARRAY this.aList this.Requery()the combo1 has these properties set at design time
RowSource = this.aList RowSourceType = 5 - Array>But the code below gives me a blank combo box what's wrong ?
>DIMENSION aCompcode[1] >SELECT dist(compcode) FROM DBF() INTO ARRAY aCompCode >FOR each aCompcode in aCompcode > Thisform.combo1.AddItem(aCompcode) >ENDFOR >This.Requery >