Hi,
I have a need for a combo box whose list of possible values is populated dynamically, depending on other controls' values. In the end I chose to do it with RowSourceType=1 and RowSourse as a string (I also tried arrays, but it didn't go well). It looks like this:
It all goes well, except that the list contains one extra empty line in the end. I'm out of ideas why it might happen. Fields' contents doesn't have commas inside, the total length of the resulting string is lesser than 256, the string doesn't contain trailing whitespaces, the table browsed by <<condition>> doesn't contain unnecessary records (including possibly deleted ones). What could cause an extra line to appear?
Thanks.
I have a need for a combo box whose list of possible values is populated dynamically, depending on other controls' values. In the end I chose to do it with RowSourceType=1 and RowSourse as a string (I also tried arrays, but it didn't go well). It looks like this:
Code:
m_list=""
SCAN FOR <<condition>>
m_list=m_list+field1+","+field2+"," && combo's ColumnCount=2
ENDSCAN
IF LEN(m_list)>0
m_list=LEFT(m_list,LEN(m_list)-1) && remove last trailing comma)
ENDIF
thisform.combo1.RowSource=m_list
Thanks.