Avatar of SteveL13
SteveL13Flag for United States of America

asked on 

Trying sum in the report page footer

I have two subreports on a main report.  Each of them have a numberin a field in the report footer section of the subreport.

But then in the main report page footer I am trying to sum those two subreport values.    I can't get anything to show up in the field on the main report.

I've tried this but it doesn't work:

=[Reports]![subrptAuditIndexPageExterior]![txtSumExterior] + [Reports]![subrptAuditIndexPageInterior]![txtSumInterior]

???
Microsoft Access

Avatar of undefined
Last Comment
Hamed Nasr
ASKER CERTIFIED SOLUTION
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

Agree with IrogSinta's comment.

Clarifying:

Assume reports mr, r1, r2
r1 has control fr1
r2 has control fr2
mr has control fmr
, control c1 which is a sub report control of Source object Report.r1
, control c2 which is a sub report control of Source object Report.r2
 
mr
       fmr
        c1
              r1: fr1
        c2
             r2:  fr2

Control source of fmr
= Reports!mr!c1.Report!fr1 + Reports!mr!c2.Report!fr2
or
= Report.c1!fr1 + Report.c2!fr2
or
= c1!fr1 + c2!fr2
or
= c1.Report!fr1 + c2.Report!fr2

The first reference is used as a complete path from Open reports collection.

If the setting is like:
mr
       fmr
        r1
              r1: fr1
        r2
             r2:  fr2
Where the sub report control name takes the name of its source object, then replace the c1 and c2 with r1 and r2 respectively in above code.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo