u write this code with form onload event....and when ur form will load then it automatically populate ur list view..
VB Code:
Dim sSQL As String Dim lvwItem As ListItem Set rs = New ADODB.Recordset sSQL = "SELECT [NAME] FROM TBL1 " rs.Open sSQL, db Do Until rs.EOF Set lvwItem = ListView1.ListItems.Add(, , rs.Fields.Item("Name").Value) rs.MoveNext Loop rs.Close Set rs = Nothing




Reply With Quote