Calculating Column in Subform and Displaying Results in Form
Posted on 2008-09-30
I'm creating a simple db that is like a ledger. There are multiple Accounts and then multiple transactions in each Account. I'm using the MS Ledger template as a starting point. I've searched/tried for days and nothing that I've read seems to work for me.
When you open the Accounts form it allows you to select an Account Name and then based on that selection the subform below populates with the individual transactions tied to that name. This works.
On the subform, named Accounts Subform, I created a text-box in the footer to calculate the total Withdrawal Amount. This does not work correctly. On the top of the main form I have a text box that should show the total of the Withdrawal column. This works but is getting a bad sum from the subform.
No matter what I do I can not get the subform to calculate completely. If I use this: "=[WithdrawalAmount]" it will show a number that is the same as the very first record for that account. But of course, it does not add up the entire column.
I've tried everything found on the net, =Sum, =Nz(sum, =dsum, etc. It just will not total the entire column.
Is there another way to do this?
Thank you for the help.