Problem summing numbers in the footer section of a report

I have a main report with 3 subreports.  In the footer section of the main report I am trying to sum values in the 3 subreports.

Here is my control source for the summed field:


But the result I get is...


if only one of the subreport fields has a value and the other two subreports have no value because there are no records in them.

Who is Participating?
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.

Jeffrey CoachmanMIS LiasonCommented:
Don't sum the subreports, ...instead try summing the fields in the subreport's recordsource:


Or something roughly like this for your object names:

...Here you may not even need the NZ(), ...but keep it in for now, just to test...

SteveL13Author Commented:

This works but gets the sum total of all records.


I need to add two criteria...  

EmpName Like "*" & [Forms]![frmTimeCardDataEntry]![txtName] & "*"
TranxDate Between [Forms]![frmTimeCardDataEntry]![txtStart] And [Forms]![frmTimeCardDataEntry]![txtEnd]

I tried this but it must not be right:

=Nz(Dsum("OTHrs","qryTimeCardDataEntry"))WHERE [EmpName] Like "*" & [Forms]![frmTimeCardDataEntry]![txtName] & "*" AND TranxDate Between [Forms]![frmTimeCardDataEntry]![txtStart] And [Forms]![frmTimeCardDataEntry]![txtEnd]+Nz(Dsum("OTHrs","qryTimeCardDataEntryCostCtrs"))WHERE [EmpName] Like "*" & [Forms]![frmTimeCardDataEntry]![txtName] & "*" AND TranxDate Between [Forms]![frmTimeCardDataEntry]![txtStart] And [Forms]![frmTimeCardDataEntry]![txtEnd]+Nz(Dsum("OTHrs","qryTimeCardDataEntryCostCtrsGrp3"))WHERE [EmpName] Like "*" & [Forms]![frmTimeCardDataEntry]![txtName] & "*" AND TranxDate Between [Forms]![frmTimeCardDataEntry]![txtStart] And [Forms]![frmTimeCardDataEntry]![txtEnd]
Jeffrey CoachmanMIS LiasonCommented:


Then try something like this syntax:

Nz(Dsum("CostCtrGroupRegHrsTotal","subrptTimeCardDataEntryRECORDSOURCE", "EmpName Like " &  "*" & [Forms]![frmTimeCardDataEntry]![txtName] & "*" & " AND " & "TranxDate Between " & [Forms]![frmTimeCardDataEntry]![txtStart] & " AND " & [Forms]![frmTimeCardDataEntry]![txtEnd]))


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
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.