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:

=Nz([subrptTimeCardDataEntry].[Report]![txtCostCtrGroupRegHrsTotal],0)+Nz([subrptTimeCardDataEntryCostCtrs].[Report]![txtCostCtrGroupRegHrsTotal],0)+Nz([subrptTimeCardDataEntryCostCtrsGrp3].[Report]![txtCostCtrGroupRegHrsTotal],0)

But the result I get is...

#Size!

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.

????
SteveL13Asked:
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:

=nz(Dsum("SubReport1Field","SubReport1RecordSource"))+nz(Dsum("SubReport2Field","SubReport2RecordSource"))+nz(Dsum("SubReport3Field","SubReport3RecordSource"))

Or something roughly like this for your object names:
=Nz(Dsum("CostCtrGroupRegHrsTotal","subrptTimeCardDataEntryRECORDSOURCE"))+Nz(Dsum("CostCtrGroupRegHrsTotal","subrptTimeCardDataEntryCostCtrsRECORDSOURCE"))+Nz(Dsum("CostCtrGroupRegHrsTotal","subrptTimeCardDataEntryCostCtrsGrp3RECORDSOURCE"))

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

JeffCoachman
0
SteveL13Author Commented:
Jeff:

This works but gets the sum total of all records.

=Nz(Dsum("CostCtrGroupRegHrsTotal","subrptTimeCardDataEntryRECORDSOURCE"))+Nz(Dsum("CostCtrGroupRegHrsTotal","subrptTimeCardDataEntryCostCtrsRECORDSOURCE"))+Nz(Dsum("CostCtrGroupRegHrsTotal","subrptTimeCardDataEntryCostCtrsGrp3RECORDSOURCE"))

I need to add two criteria...  

EmpName Like "*" & [Forms]![frmTimeCardDataEntry]![txtName] & "*"
and
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]
0
Jeffrey CoachmanMIS LiasonCommented:
Oh,

Thanks,

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]))

JeffCoachman
0

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.