OK, let me go back to the starting point. The report I am working on
is
based on a query. So in the query I must have a field that calculates
the
HaulingCost and another one that calculates the LaborCharge. If I call
those
SumHaulingCost and SumLaborCharge, then I need another field in the
query
that calculates the sum of each of these called TotalCost (or whatever
I
what
to call it). If I do this, then I can put this new field [TotalCost]
in
the
report footer and that would calculate everything? correct?
Thanks
Curt Wedbush
:
Ok,
Let's go back to square one. The control source for a calculated
value
in
any of the section footers, including the report footer, must be the
calculation of a field that is in the Record Source of the report.
Therefore, if you have a field called [LaborCharge] in the Record
source
of
your report, to get the total of that in any of the footers you have
to
put
=Sum([LaborCharge]) in the control source of the control that will
display
the sum. If you want the calculation of 2 fields in a footer (say
[LaborCharge] and [HaulingCost]), then you need to put
=Sum([LaborCharge]) +
Sum([HaulingCost]) in the control source of your control.
Do you have a field in the Record Source of your report called [Sum of
LaborCharge] and one called [Sum of HaulingCost]?
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security:
www.ltcomputerdesigns.com/Security.htm
message
The CustTotalCost control source is =[Sum of LaborCharge]+[Sum of
HaulingCost]
But the CustTotalCost is the page footer and is a total of each
customer
(their monthly bill). That works fine. What I am trying to do is
get
a
total of all the customers invoices for a grand total that is
located
in
the
report footer.
Thank you for your attention
Curt Wedbush
:
If I understand your situation correctly, the control source for
your
CustTotalCost control needs to be =Sum([HaulingCost]) + Sum
([LaborCharge])
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security:
www.ltcomputerdesigns.com/Security.htm
message
The control source is Sum([HaulingCost]) and Sum([LaborCharge])
and
it
works
in the report footer.
I am confused why it doesn't work for the CustTotalCost
Thanks
Curt Wedbush
:
What is the control source for [TotalHaulingCost] and
[TotalLaborCharge]?
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security:
www.ltcomputerdesigns.com/Security.htm
message
No. [CustTotalCost] is a calculated field in the footer of
the
report.
(The
report is divided by Customer) However, in the report footer
it
will
calculate TotalHaulingCost for all customer and
TotalLaborCharge
for
all
customers but I can't add those together.
Thanks for attention
Curt Wedbush
:
is [CustTotalCost] a field in the Record Source of your
report?
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security:
www.ltcomputerdesigns.com/Security.htm
in
message
The control source for the monthly total for a customer is
[CustTotalCost].
I created a text box in the report footer and put only that
in
the
control
source of the new unbound box and it gives the total of the
last
customer
only not a grand total. Did I do what you were saying
correctly
or
am
I
missing something else?
Thanks
Curt
:
You can't use the control name in a Sum function on a
report.
Open
the
report in Design view and see what the control source is
for
the
field
[CustTotalCost]. Place the same thing in the control
source
of
an
unbound
control in the Report footer.
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security:
www.ltcomputerdesigns.com/Security.htm
"Curt Wedbush" <
[email protected]>
wrote
in
message
I have created a report that prints out customer invoices
and
totals
their
cost in a field called CustTotalCost. I am wanting to
get
grand
totals
for
all customers on the last page.
The report currently displays grand totals for other
fields
(Hauling
Cost)
(Labor Cost) etc. on the last page of the report. But I
can't
get
it
to
calculate a GrandTotal for all the customers. This
would
give
us
the
total
monthly invoice amount.
I have tried creating a text box that in the control
source
box I
have
used
=Sum([CustTotalCost]) but it displays nothing - not even
an
error
message.
I
thought this would be simple straight forward thinking
but
obviously
not.
Any suggestions would be appreciated
Thanks
Curt