lnOpBal = 0 lnCloBal = 0 SCAN lnCloBal = lnOpBal + Table.Receipt - Table.Payment REPLACE Opening WITH lnOpBal, Balance WITH lnCloBal lnOpBal = lnCloBal ENDSCANUntested you will have to adapt it. As you will notice though other posters have not given you code but were aiming for something similar and had assumed that you can do basic programming yourself. You were lucky that experienced people were responding to your thread.