>Hi All:
>
>I'm using a 2 column array in a combobox, displaying only the first column but using the 2nd column as the filter type. Is there an easy way to only display the values in the 1st column that conform to those in the first?
>
>Thanks
>Luke
Lucien,
It'd be easier to control with an SQL rowsourcetype.
However for arrays since you're using only one column you might utilize NumberOfElements property. ie: Suppose you want to show only those with a value GTE text1.value (assuming 2nd col filter is sortable like where unit_price >= 100 or .t./.f. etc) :
Asort(Thisform.aElems,2,-1,1)
Local lnRow
For lnRow=1 To Alen(Thisform.aElems,1)
If Thisform.aElems[m.lnRow,2] < Thisform.Text1.Value
Exit
Endif
Endfor
If lnRow > 1
Thisform.combo1.NumberOfElements=m.lnRow-1
Else
Messagebox('No match')
Endif
Cetin