#Error summarizing calculated fields on a form

MS Access 2013:  I have a subform with some calculated fields in the detail.  I want to summarize these fields in the footer of the report but the summary fields in the footer of the report show '#error'.

This is one of the calculated fields in the Form 'Detail' section, Name:'AccumPayAmt', Control Source: '=IIf([PostedStatusID]=3,0,[PayAmt])'

The calculated fields are showing the correct amount.

This is one of the summary fields in the form 'Footer' section: Name 'Text108', Control Source: '=Sum([AccumPayAmt])'

There are a few other fields but all are the same construct.

Can anyone spot the problem?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gustav BrockCIOCommented:
Try summing the source:


Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
No points please since Gus gave you the answer.  Access maintains only a single set of properties for a form so even though you see multiple instances of the subform, there is still only one set of properties.  That is why you have to sum the underlying data and perform the calculations again.
mlcktmguyAuthor Commented:
Thank you Gustav for the answer and Pat for the explanation.

Pat: At your request I awarded all of the points to Gustav
Thanks.  He gave you the answer but I thought you should also know why what you were doing would not work since it wasn't a mystery.  Your code was what 100% of newcomers would have tried and usually a good guess like that should be rewarded but not this time.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.