Hi,
I have an application that update multiple rows (between 10-80) records at a time. My challenge is when I click the update button to update records up to 30-50, it skips the first 11-29 records and update the rest.
Please can some tell me why it's like that?
Here's my VBA for update:
"On Error Resume Next
Dim RS As DAO.Recordset
Dim KeK As Integer
KeK = 0
Set RS = Me.RecordsetClone
DoCmd.RefreshRecord
If RS.EOF Then
MsgBox "Please Select at Least 1 Item to complete this Transaction", vbInformation, "JMT Business Solution"
Me.cboItemID.SetFocus
Else
With RS
RS.MoveFirst
Do While Not RS.EOF
RS.Edit
RS("QtyAvail") = RS("QtyAvail") + RS("QtyIn")
RS("UnitCost") = RS("ExtendedPrice")
RS("SupplierAcc") = RS("SupplierAcc") - RS("AmountRecorded")
RS.Update
RS.MoveNext
Loop
RS.Close
End With
Set RS = Nothing
End If"
Thanks a million for quick response
Moore
I have an application that update multiple rows (between 10-80) records at a time. My challenge is when I click the update button to update records up to 30-50, it skips the first 11-29 records and update the rest.
Please can some tell me why it's like that?
Here's my VBA for update:
"On Error Resume Next
Dim RS As DAO.Recordset
Dim KeK As Integer
KeK = 0
Set RS = Me.RecordsetClone
DoCmd.RefreshRecord
If RS.EOF Then
MsgBox "Please Select at Least 1 Item to complete this Transaction", vbInformation, "JMT Business Solution"
Me.cboItemID.SetFocus
Else
With RS
RS.MoveFirst
Do While Not RS.EOF
RS.Edit
RS("QtyAvail") = RS("QtyAvail") + RS("QtyIn")
RS("UnitCost") = RS("ExtendedPrice")
RS("SupplierAcc") = RS("SupplierAcc") - RS("AmountRecorded")
RS.Update
RS.MoveNext
Loop
RS.Close
End With
Set RS = Nothing
End If"
Thanks a million for quick response
Moore