|
-
Sep 15th, 2017, 06:33 AM
#1
Thread Starter
New Member
[RESOLVED] loop problem using adodb , acess ASAP
Private Sub cmdsave_Click()
Set rs248 = New ADODB.Recordset
rs248.Open "Select * from tblStock", cnn, adOpenDynamic, adLockPessimistic
With rs248
If Not .EOF Then
rs248.Fields("category").Value = catecmb.Text
rs248.Fields("Subcategory").Value = subcatcmb.Text
rs248.Fields("Mused").Value = metalcmb.Text
rs248.Fields("Weight").Value = weightcmb.Text
rs248.Fields("Stin").Value = rs248.Fields("Stin").Value + quantitytxt.Text
rs248.Update
rs248.Close
Else
rs248.AddNew
rs248.Fields("Category").Value = catecmb.Text
rs248.Fields("Subcategory").Value = subcatcmb.Text
rs248.Fields("Mused").Value = metalcmb.Text
rs248.Fields("Weight").Value = weightcmb.Text
rs248.Fields("Stin").Value = quantitytxt.Text
rs248.Update
rs248.Close
End If
End With
end sub
i enter
necklace pendent gold24k 3.2 8
necklace pendent gold24k 3.2 10
ring xyzz gold22k 1.1 15
table should store
necklace pendent gold24k 3.2 18
ring xyzz gold22k 1.1 15
Tags for this Thread
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
|