Per your post here you mention one can populate the list box in one go (without the field names).
If I replace the code
Code: Select all
Me.ListBox1.AddItem rst.Fields(0).Name
For j = 1 To CC - 1
Me.ListBox1.Column(j, 0) = rst.Fields(j).Name
Next j
Do While Not rst.EOF
i = i + 1
Me.ListBox1.AddItem rst.Fields(0).Value
For j = 1 To CC - 1
Me.ListBox1.Column(j, i) = rst.Fields(j).Value
Next j
rst.MoveNext
Loop
with
Me.ListBox1.List = rst.GetRows
Any idea as to why? If I leave the code as is, all records are populated to the ListBox as expected.