I have a subscription system that i have developed. the system is supposed to automatically subtract the number of copies given to a client every monthend as per request they made of the copies required upon joining. my problem is i cant make my code run through my database so that it can subtract from every record....instaed it can deal with one record at a time. i cant manually subtract because the records at one time are going to reach thousands. i justa want it to automatically subtract from all fields when a button is clicked.
i have een trying to use this code but its not working.
With rc
.ActiveConnection = deSub.conn
.LockType = adLockOptimistic
.Source = "select * from cooperatesubs"
.Open
End With
z = rc.Fields("numberofcopies")
Do Until rc.EOF
rc.AddNew
rc.Fields("numberofcopies") = z
rc.Fields("copiesgiven") = y
rc.Fields("copiesremaining") = z - y
rc.Update
rc.MoveNext
Loop
Exit Sub