Total of a calclated field

  • Thread starter Thread starter thriveni
  • Start date Start date
T

thriveni

I use access 2000.
I have created a report using the report wizard and then I
have a calculated field on the report . I want to have a
grand total of this calculated field in the footer (report
footer) that would add up the totals of all the rows but I
am not able to figure out how to do that. It gives me an
error if I used the same expression as for the calculated
field in the report footer.
Any help would be appreciated.
 
I got this from a previous post by Dirk Goldgar

Check the following points:

(1) The summing text box must be in a group or report
footer or header section. Usually it will be in a footer
section. Don't put it in a page footer or header.

(2) The name of the summing text box must not be the same
as the name of a field in the report's recordsource. So if
your text box is summing the [Retail Price] field, as with
the controlsource you posted, name it something like
"txtTotalRetail".

(3) The argument of the Sum() function must be a field or
an expression of fields in the report's recordsource; it
can't be the name of an unbound or calculated control. If
you have a calculated control, for example if [Retail
Price] is a text box with controlsource
"=[WholesalePrice]+[Markup]", where [WholesalePrice] and
[Markup] are fields in the recordsource, then you must
repeat the calculation in the argument to the Sum()
function, as with this controlsource:
"=Sum(WholesalePrice]+[Markup])".

Dirk Goldgar, MS Access MVP

Jim
 
Back
Top