Double rows in combobox

Can anyone help me figure out why I am getting 2 of each row from a table in the Windows desktop combobox list? The are four records or rows in the table, but the list contains 8 rows, 2 of each table row. When I step through the loop in the debugger it loops only 4 times. I wonder what is happening?

cboIP.RemoveAllRows

For Each row As DatabaseRow In data
  cboIP.AddRow(row.Column("ip").StringValue)
next

I also tried it this way.

cboIP.RemoveAllRows

For Each row As DatabaseRow In data
  cboIP.AddRowAt(row.Column("id").IntegerValue,row.Column("ip").StringValue)
next

This is the result

This is the data in the table

Thanks for looking. I had some code that should have been commented causing the problem.

1 Like

Mark this solved, or hidden then - the code you showed us would only generate 4 rows, unless the database query was using a join you hadnt spotted.

3 Likes