This is a loose example. I don't know how many fields are in your recordset that you want in your Listview, so modify accordingly, and change the field names appropriatelyVB Code:
Dim MyItem As ListItem Do While Not Rs.EOF Set MyItem = ListView1.ListItems.Add(, , RecordSetObject.Fields.Item("fieldname1").Value) MyItem.SubItems(1) = RecordSetObject.Fields.Item("fieldname2").Value) MyItem.SubItems(2) = RecordSetObject.Fields.Item("fieldname3").Value) Rs.MoveNext Loop




Reply With Quote