how can i save a data in listview1? i have a problem to my code heres my code
Dim objNewListItem As ListItem
Set rs = New ADODB.Recordset
rs.Open "Select * from Supplier", cn, adOpenKeyset, adLockPessimistic
rs.MoveFirst
Do While Not rs.EOF
Set objNewListItem = lvwCustomer.ListItems.Add(, , rs.Fields("scode"))
objNewListItem.SubItems(mlng_Supp_Name) = rs.Fields("sname") & ""
objNewListItem.SubItems(mlng_Supp_Address) = rs.Fields("saddress") & ""
objNewListItem.SubItems(mlngSuppContactno) = rs.Fields("scontactno")
rs.MoveNext
Loop
everytime i click my command button, the list item in a listview1 is having a duplication. .
help me thanks. .