I want to calculate the cumulative totals for each account in my database
I created a query qCumTot with four fields
Account: text field sort ascending from another table
Date:
Income: Currency from another table
CumTot: Created in this query and set to set = 0
I intended to overwrite CumTot using visual basic
so I could see the results in the output of the query
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("qCumTot")
Looping thorough record set I can calculate CumTotal
But I cannot overwrite rs![CumTot}
rs.Edit
rs![CumTot] = CumTotal
‘ Gives Error 3164:
‘ Field cannot be updated, another process has locked record or table
rs.Update
Any suggestions