Link to home
Start Free TrialLog in
Avatar of seamus99
seamus99

asked on

How to Sum a Calculated Field in a Form Footer Access 2007

I have a Form (Datasheet is the default view) that contains a caluated field.   (RevisedBill).  I want to total all the rows , I created a Text Box in the footer of the form using:

=sum(RevisedBill)  I get nothing in the box no, error or anything just a blank field.

Any help?
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

you will not see anything in the footer of the form in Datasheet view.
use Continuous Forms as the default view,
use this in the Control Source of the textbox
=sum([RevisedBill])
seamus99,

You can only apply those aggregate (across-records) functions to fields in the form's field list.

It sounds like you've got a text box that does a calculation in its control source, like =Price - (Price * Nz(Discount)). Access will not let you Sum, Max, Min across those text box controls.

Instead, create a query with all of the underlying table or query's fields and an additional field, RevisedBill: Price - (Price * Nz(Discount)). RevisedBill will then appear on the form's field list. Change the Control Source of the textbox with the calculation to: RevisedBill (no equals sign). Then you can add a control with an aggregate function of this field, like =Sum(RevisedBill) or Max(RevisedBill).

HTH,

pT72
ASKER CERTIFIED SOLUTION
Avatar of pteranodon72
pteranodon72
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial