OK I implemented it with a temp table.
1. A query finds out balance and writes to a temp table.
2. A sub calculates total_balance and appends to the temp table.
3. Display.
Thanks
Tova: