Populate Listbox With Selected Fields From Recordset

colofnature

New member
Local time
Today, 13:40
Joined
Sep 19, 2006
Messages
4
I have an ADO recordset "adoDataset", retreived from the web. I also have a listbox "lstDataset" in a form. I need to populate lstDataset with only the 2nd, 3rd and 5th fields of adoDataset. Is there an efficient way? One which doesn't involve iterating over the records of the set and adding the required info from each to the listbox one at a time? Something like:

Set lstDataset.Recordset = adoDataset.Fields([1,2,4])

It just feels like there should be something along those lines. Any ideas?
 
Last edited:
Just hide the fields you don't want shown in the listbox by using the ColumnWidths property of the listbox.
 

Users who are viewing this thread

Back
Top Bottom