Hi,
I am just worried how to update multiple record using ADO since when I used DAO, update is possible with few records, but when the records gets to 50 or more, error rises.
Here is the code I used:
"Dim RS As DAO.Recordset
Set RS = Me.RecordsetClone
With RS
.MoveFirst
Do While Not .EOF
'If RS.EOF Then
.Edit
RS("QtyAvail") = RS("QtyAvail") + RS("QtyIn")
RS("UnitCost") = RS("ExtendedPrice")
RS("SupplierAcc") = RS("SupplierAcc") - RS("AmountRecorded")
.Update
'End If
.MoveNext
Loop
.Close
End With
Set RS = Nothing"
So tell me what is wrong here!
Thanks for your response
I am just worried how to update multiple record using ADO since when I used DAO, update is possible with few records, but when the records gets to 50 or more, error rises.
Here is the code I used:
"Dim RS As DAO.Recordset
Set RS = Me.RecordsetClone
With RS
.MoveFirst
Do While Not .EOF
'If RS.EOF Then
.Edit
RS("QtyAvail") = RS("QtyAvail") + RS("QtyIn")
RS("UnitCost") = RS("ExtendedPrice")
RS("SupplierAcc") = RS("SupplierAcc") - RS("AmountRecorded")
.Update
'End If
.MoveNext
Loop
.Close
End With
Set RS = Nothing"
So tell me what is wrong here!
Thanks for your response