Report Sum Totals On Last Page

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Someone asked yesterday about sub totaling each page in a report. While that
fix works to a degree for me, what I ultimately would like is just a sum on
the final page of my report. I have two fields I want summed: "Qty" and
"Cost." Qty is a field on the report; the "Cost" field is not on the report
(but is a field in the same query) - on the last page of the report I need
both fields to show a sum total. Is this doable and what is the best method
for perfoming this. I used the "If PrintCount = 1 Then curTotal = curTotal +
Me.Amount" and that is pretty close, but not quite it.

Thanks in advance for your assistance.
 
All you should need is a couple text boxes in your Report Footer section. To
sum the qty, use a control source of:
=Sum([Qty])
If Cost is a numeric field in the report's record source, use as control
source of:
=Sum([Cost])

No code is needed unless you feel you want page totals.
 
Thanks for your help but when I try this I get #Error. Is there something
else I may have missed or overlooked. I may not have made my original post
clear enough.

The report has the fields: "Part" and "Qty"
The query has the above fields and an additional field "Cost"
I would like the last page to show a Sum of "Qty" and "Cost"


Duane Hookom said:
All you should need is a couple text boxes in your Report Footer section. To
sum the qty, use a control source of:
=Sum([Qty])
If Cost is a numeric field in the report's record source, use as control
source of:
=Sum([Cost])

No code is needed unless you feel you want page totals.

--
Duane Hookom
MS Access MVP
--

theiguanainthesauna said:
Someone asked yesterday about sub totaling each page in a report. While
that
fix works to a degree for me, what I ultimately would like is just a sum
on
the final page of my report. I have two fields I want summed: "Qty" and
"Cost." Qty is a field on the report; the "Cost" field is not on the
report
(but is a field in the same query) - on the last page of the report I
need
both fields to show a sum total. Is this doable and what is the best
method
for perfoming this. I used the "If PrintCount = 1 Then curTotal = curTotal
+
Me.Amount" and that is pretty close, but not quite it.

Thanks in advance for your assistance.
 
OK, this works in the report header, but not in the footer. What could cause
this to happen?

theiguanainthesauna said:
Thanks for your help but when I try this I get #Error. Is there something
else I may have missed or overlooked. I may not have made my original post
clear enough.

The report has the fields: "Part" and "Qty"
The query has the above fields and an additional field "Cost"
I would like the last page to show a Sum of "Qty" and "Cost"


Duane Hookom said:
All you should need is a couple text boxes in your Report Footer section. To
sum the qty, use a control source of:
=Sum([Qty])
If Cost is a numeric field in the report's record source, use as control
source of:
=Sum([Cost])

No code is needed unless you feel you want page totals.

--
Duane Hookom
MS Access MVP
--

theiguanainthesauna said:
Someone asked yesterday about sub totaling each page in a report. While
that
fix works to a degree for me, what I ultimately would like is just a sum
on
the final page of my report. I have two fields I want summed: "Qty" and
"Cost." Qty is a field on the report; the "Cost" field is not on the
report
(but is a field in the same query) - on the last page of the report I
need
both fields to show a sum total. Is this doable and what is the best
method
for perfoming this. I used the "If PrintCount = 1 Then curTotal = curTotal
+
Me.Amount" and that is pretty close, but not quite it.

Thanks in advance for your assistance.
 
It should work in the Report Footer but not the Page Footer. Also, the name
of the text box must not be the name of a field in your record source.

--
Duane Hookom
MS Access MVP
--

theiguanainthesauna said:
OK, this works in the report header, but not in the footer. What could
cause
this to happen?

theiguanainthesauna said:
Thanks for your help but when I try this I get #Error. Is there something
else I may have missed or overlooked. I may not have made my original
post
clear enough.

The report has the fields: "Part" and "Qty"
The query has the above fields and an additional field "Cost"
I would like the last page to show a Sum of "Qty" and "Cost"


Duane Hookom said:
All you should need is a couple text boxes in your Report Footer
section. To
sum the qty, use a control source of:
=Sum([Qty])
If Cost is a numeric field in the report's record source, use as
control
source of:
=Sum([Cost])

No code is needed unless you feel you want page totals.

--
Duane Hookom
MS Access MVP
--

"theiguanainthesauna" <[email protected]>
wrote
in message Someone asked yesterday about sub totaling each page in a report.
While
that
fix works to a degree for me, what I ultimately would like is just a
sum
on
the final page of my report. I have two fields I want summed: "Qty"
and
"Cost." Qty is a field on the report; the "Cost" field is not on the
report
(but is a field in the same query) - on the last page of the report
I
need
both fields to show a sum total. Is this doable and what is the best
method
for perfoming this. I used the "If PrintCount = 1 Then curTotal =
curTotal
+
Me.Amount" and that is pretty close, but not quite it.

Thanks in advance for your assistance.
 
Thank you for your assistance, I saw the error of my ways. It works exactly
like you said.

the iguana

Duane Hookom said:
It should work in the Report Footer but not the Page Footer. Also, the name
of the text box must not be the name of a field in your record source.

--
Duane Hookom
MS Access MVP
--

theiguanainthesauna said:
OK, this works in the report header, but not in the footer. What could
cause
this to happen?

theiguanainthesauna said:
Thanks for your help but when I try this I get #Error. Is there something
else I may have missed or overlooked. I may not have made my original
post
clear enough.

The report has the fields: "Part" and "Qty"
The query has the above fields and an additional field "Cost"
I would like the last page to show a Sum of "Qty" and "Cost"


:

All you should need is a couple text boxes in your Report Footer
section. To
sum the qty, use a control source of:
=Sum([Qty])
If Cost is a numeric field in the report's record source, use as
control
source of:
=Sum([Cost])

No code is needed unless you feel you want page totals.

--
Duane Hookom
MS Access MVP
--

"theiguanainthesauna" <[email protected]>
wrote
in message Someone asked yesterday about sub totaling each page in a report.
While
that
fix works to a degree for me, what I ultimately would like is just a
sum
on
the final page of my report. I have two fields I want summed: "Qty"
and
"Cost." Qty is a field on the report; the "Cost" field is not on the
report
(but is a field in the same query) - on the last page of the report
I
need
both fields to show a sum total. Is this doable and what is the best
method
for perfoming this. I used the "If PrintCount = 1 Then curTotal =
curTotal
+
Me.Amount" and that is pretty close, but not quite it.

Thanks in advance for your assistance.
 
Back
Top