julieatnexus
Technical User
I have the following for/next loop in my project. When I enter a number for the fields value (ie.ADOSO.Recordset.Fields("Due" = 20), the update works. When I enter the variable 'y'(ie. ADOSO.Recordset.Fields("Due" = y) , it gives me a run-time error :Multiple-step operation generated error. Check each status value.
The variables 'qty' and 'y' are both integers.
For x = 1 To ADOSO.Recordset.RecordCount
If qty = 0 Then
ADOSO.Recordset.Fields("Due" = ADOSO.Recordset.Fields("qty"
ADOSO.Recordset.Update
ADOSO.Recordset.MoveNext
Else
If ADOSO.Recordset.Fields("qty" <= qty Then
ADOSO.Recordset.Fields("Due" = 0
ADOSO.Recordset.Update
qty = qty - ADOSO.Recordset.Fields("qty"
ADOSO.Recordset.MoveNext
Else
y = ADOSO.Recordset.Fields("qty" - qty
ADOSO.Recordset.Fields("Due" = y
ADOSO.Recordset.Update
qty = 0
ADOSO.Recordset.MoveNext
End If
End If
Next x
Any help you can give would be greatly appreciated.
Thanks,
Julie
The variables 'qty' and 'y' are both integers.
For x = 1 To ADOSO.Recordset.RecordCount
If qty = 0 Then
ADOSO.Recordset.Fields("Due" = ADOSO.Recordset.Fields("qty"
ADOSO.Recordset.Update
ADOSO.Recordset.MoveNext
Else
If ADOSO.Recordset.Fields("qty" <= qty Then
ADOSO.Recordset.Fields("Due" = 0
ADOSO.Recordset.Update
qty = qty - ADOSO.Recordset.Fields("qty"
ADOSO.Recordset.MoveNext
Else
y = ADOSO.Recordset.Fields("qty" - qty
ADOSO.Recordset.Fields("Due" = y
ADOSO.Recordset.Update
qty = 0
ADOSO.Recordset.MoveNext
End If
End If
Next x
Any help you can give would be greatly appreciated.
Thanks,
Julie