By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,379 Members | 3,035 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,379 IT Pros & Developers. It's quick & easy.

Save and Edit data from Listview to MS Access

newbiefyke
P: 2
Expand|Select|Wrap|Line Numbers
  1. Public Class Form3
  2.  
  3.     Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  4.         lv1.Columns.Add("name", CInt(lv1.Width / 3))
  5.         lv1.Columns.Add("age", CInt(lv1.Width / 3))
  6.         lv1.Columns.Add("color", CInt(lv1.Width / 3))
  7.     End Sub
  8.  
  9.     Private Sub add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles add.Click
  10.         Call AppendItemtolistview(TextBox1.Text, TextBox2.Text, TextBox3.Text)
  11.     End Sub
  12.  
  13.     Private Sub AppendItemtolistview(ByVal name As String, ByVal age As String, ByVal color As String)
  14.         Dim newitem As New ListViewItem(name)
  15.         newitem.SubItems.Add(age)
  16.         newitem.SubItems.Add(color)
  17.  
  18.         lv1.Items.Insert(0, newitem)
  19.     End Sub
  20.  
  21. End Class
This is my code to add data in List view.

Q. how can I save it to MS access?
Can I edit the data in any row?
Attached Images
File Type: jpg 1.jpg (36.1 KB, 49 views)
Mar 13 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.