Try the following -
With rc
.ActiveConnection = deSub.conn
.LockType = adLockOptimistic
.Source = "select * from cooperatesubs"
.Open
End With
Dim w As Integer
Dim x As Integer
Dim y As Integer
Dim z As Integer
Do Until rc.EOF = True
y = rc.Fields("copiesgiven")
z = rc.Fields("numberofcopies")
x = z - y
w = y + 1
rc.AddNew
'rc.Fields("numberofcopies") = z This will not change, for it is a set number, correct?
rc.Fields("copiesgiven") = w
rc.Fields("copiesremaining") = x
rc.Update
rc.MoveNext
Loop
Exit Sub
Reputation Points: 329
Solved Threads: 347
Senior Poster
Offline 3,700 posts
since Jan 2008