I use the below code but a error massage show: "Invalid property value"Code:Dim RsL As New ADODB.Recordset Dim sqlEmp As ListItem LvwAddEmployees.ListItems.Clear If RsL.State = 1 Then RsL.Close RsL.CursorLocation = adUseClient RsL.Open "Select * from Accounts", GConn, 3, 4 If (RsL.RecordCount > 0) Then RsL.MoveFirst End If While Not RsL.EOF Set sqlEmp = LvwAddEmployees.ListItems.Add(, , RsL!SrNo) sqlEmp.SubItems(2) = RsL!AccountName sqlEmp.SubItems(3) = RsL!OpeningBalance RsL.MoveNext Wend Set RsL = Nothing




Reply With Quote