I've been trying to import or save my listview items/rows/content to access db.. ive been playing around this code:
but it only save the item on the first row of my database. Any idea on what I should do with the code?
Thanks in advance
Code:
Set rs = New ADODB.Recordset
rs.Open "Select * from TblSearchMainAssets", cn, adOpenKeyset, adLockOptimistic
For Each itm In ListView1.ListItems
rs.AddNew
rs.Fields("Assettag") = ListView1.SelectedItem.Text
rs.Fields("AssetDescription") = ListView1.SelectedItem.SubItems(1)
Next
rs.Update
rs.Requery
MsgBox "done"
rs.Close
Set rs = Nothing
Thanks in advance