I am trying to load sqlite data into a ListBox so that the same recordset will fill multiple columns of the list box.
I want to load 40 records into each column . When the first 40 are filled, I would like it to jump to the first row of the second column an fill that column. I will have about 5 columns total.
I can load the first 40 rows just fine with the code below, but when I start to load the second column the data is placed in the next row (41st row), instead of going up and starting at the first row of the second column.
In the code below I know I am calling for the LastIndex and that is why it is continuing on the next row, but what is the code for telling the Listbox to go back up and start filling column 2 at the top row. Is there a way to do that? I don’t see anything in the documentation, or I’m just not looking in the right spot. Any ideas would be appreciated.
[code] While Not rs.eof
X = X + 1
List1.AddRow If X < 41 Then List1.Cell(List1.LastIndex,0)=txtMember.Text rs.MoveNext elseIf X > 40 And X < 81 Then List1.Cell(List1.LastIndex,1)=txtMember.Text rs.MoveNext Else Exit End If