With list1 .View = lvwReport .Appearance = ccFlat .FullRowSelect = True .GridLines = False .HotTracking = True .HoverSelection = True .HideSelection = False .ColumnHeaders.Add 1, "d1", "Investigation" .ColumnHeaders.Add 2, "d2", "Rate" End With Connection Dim lst As ListItem list1.ListItems.Clear Set rs = New ADODB.Recordset rs.Open "select * from investigation order by investigation desc", Con, adOpenDynamic, adLockBatchOptimistic If rs.RecordCount <> 0 Then Do While Not rs.EOF Set lst = list1.ListItems.Add(1) lst.Text = rs.Fields!investigation lst.SubItems(1) = rs.Fields!Rate rs.MoveNext Loop Set rs = Nothing End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)