|
-
Mar 16th, 2009, 02:27 AM
#1
Thread Starter
Junior Member
how-save-listitem from listbox-to ms access-vb6
here i attach the error msg.
i had some item in listbox and i remove
the duplicate item.i fnished this much with the help of ur vb forum
----------------------
how save that listitem
into ms access table?
then how i retrieve that value?
i try this codings.
-----------
Private Sub Command3_Click()
rs1.Open "select * from table1 where nid = " & Trim(Text1.Text), con, adOpenDynamic, adLockOptimistic
rs1.Fields("no") = Val(List1.Text) // save the item in table
MsgBox "added"
rs1.Update
rs1.Close
End Sub
--------------
//to retrieve the item
Private Sub Command1_Click()
rs1.Open "select * from table1 where nid = " & Trim(Text1.Text), con, adOpenDynamic, adLockOptimistic
rs1.AddNew
Text1.Text = rs1.Fields("nid")
Text3.Text = rs1.Fields("no") //get that item form table
rs1.Update
rs1.Close
----------------
please rectify the error
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|