Same as per your previous post, have a look at this discussion.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Oops, my bad. Seems I'm human after all. I read it as listview.
If you want to add data to the listbox, as rishif2 sampled above. (Thanx rishif)
If you want to retrieve the data from listbox and add to database...
con.Provider = "Microsoft.Jet.OLEDB.4.0"
con.Open App.Path & "\db.mdb"
rec.Open "SELECT field_name1,field_name2 FROM tbl WHERE Id ='" & idhere & "'", con, 2, 3
''If edit...
rec!field_name1 = Listbox1.Text
rec.Update
''If new record...
rec.Open "SELECT field_name1,field_name2 FROM tbl", con, 2, 3
rec!field_name1 = Listbox1.Text
rec.Update
con.Close
Set con = Nothing
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Question Answered as of 4 Months Ago by
AndreRet
and
rishif2 :) Only a pleasure.
Happy coding...
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20