Trying to sum numbers on a report

I have a report which has the main report and a subreport.  At the bottom of the report I'm trying to sum numbers from both the main report and the subreport.  Here is my control source but it isn't working.  

=Sum([RegHrs])+[Reports]![subrptTimeCardDataEntryCostCtrs]![txtCostCtrGroupRegHrsTotal]

I'm getting #Name? for the result.  Can someone see what I'm doing wrong?

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

Gustav BrockCIOCommented:
Try with:

=Sum([RegHrs])+[Reports]![subrptTimeCardDataEntryCostCtrs].Report![txtCostCtrGroupRegHrsTotal]

And subrptTimeCardDataEntryCostCtrs must be the name of the subform control, not the report.

/gustav
0
SteveL13Author Commented:
I now have ...

=Sum([RegHrs])+[Reports]![txtCostCtrGroupRegHrsTotal].[Report]![txtCostCtrGroupRegHrsTotal]

but it still isn't working.

??
0
Gustav BrockCIOCommented:
It's the name of the subform control to use, not the name of the textbox.

/gustav
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

SteveL13Author Commented:
Do you mean...

=Sum([RegHrs])+[Reports]![CostCtrGroupRegHrsTotal].[Report]![txtCostCtrGroupRegHrsTotal]

If so, that isn't working.  I'm sorry I'm not following.
0
Jeffrey CoachmanMIS LiasonCommented:
Also remember that you can use the expression builder to build expressions like this.
Just click the button with the three dots (or right-click the control and select "build") and you get a graphical interface where you can navigate the objects and drill down to see all the objects and controls.
0
Gustav BrockCIOCommented:
Sorry, it should be:

=Sum([RegHrs])+[subrptTimeCardDataEntryCostCtrs].Report![txtCostCtrGroupRegHrsTotal]

where [subrptTimeCardDataEntryCostCtrs] is the name of the subform control.

To use the full name, it would be:

=Sum([RegHrs])+[Reports]![NameOfYourReport]![subrptTimeCardDataEntryCostCtrs].Report![txtCostCtrGroupRegHrsTotal]

/gustav
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
SteveL13Author Commented:
That was it!!!  Thanks again.
0
Gustav BrockCIOCommented:
You are welcome!

/gustav
0
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.