Yes sir,
Learning Access through trial and error is very frustrating. I don't know
what control names are. I inserted a textbox in the report header and in the
right of the two boxes that appear typed =Count(*) which I learned through
the discussion group online.
I then typed a lable in the left part of the textbox. When I click on the
lable, lable164 appears in my toolbar, so I assumed this was the CtlA
referred to below, and when I clicked on the textbox part, text163 appeared
in the toolbar, so I assumed this was the txtA referred to below.
Duane Hookom said:
If you want specific help, you should reply with an description of your
control names. If you use spaces in control names or other object names, you
need to wrap the names in []s. Also, I can't imagine a subreport control with
a name beginning with "lable" which suggests a label control.
--
Duane Hookom
Microsoft Access MVP
franklinbukoski said:
This is what I used to test it and did not work:
=IIf(lable64.mt for bc awards.HasData, lable64.mt for bc awards.txt163,0)+
(lable64.mt for bc ncoer past due.HasData, lable64.mt for bc ncoer past
due.txt163,0)
:
If all of the subreports are going to return at least one record you should
be able to use a control source like:
=subrptCtlA.Report.txtA + sburptCtlB.Report.txtB +...
If one or more subreport won't return records you need to use the HasData
property like:
=IIf(subrptCtlA.Report.HasData, subrptCtlA.Report.txtA,0)
--
Duane Hookom
Microsoft Access MVP
:
I have multiple reports (on a subreport) that calculate total records in each
report with the following in each reports header:
=Count(*)
How do I write the formula to add the values from each subreport to and
present in the parent report header?
Is it:
reports.report1.field1+reports.report2.field2