Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculation problem

Status
Not open for further replies.

toffa

Programmer
Aug 24, 2004
77
AU
i have a form that has the fields item price qty and total.
the total field is =[price]*[qty]
this is a continuos form.
in the footer i wanted to put in a grand total of the totals for this i used =Sum([total]),

This does not work and i was wandering if it is because of the double calculations or would there be an alternate way of having this second calculation or even the first.

Chris
 
dont worry i have worked it out by using =Sum([price]*[qty])

thanks for looking

Chris
 
For future info, see the ubiquitous [/b{F1}[/b] (aka HELP). You cannot use sum on a calculated control. It is more common to include the calc for a running total in the recordsource (query) as a calculated field, and use that field in the report -where the runnig sum is available.




MichaelRed


 
Also keep in mind that if you try to use sum (or other aggretgate functions) on the page footer of a form or report, you'll get an error. You can't put these formulas on page footers. To get around it, put the sum function in a control on a group or report footer, and reference that control to an unbound control on the page footer.

-Patrick

Nine times out of ten, the simplest solution is the best one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top