PDA

View Full Version : Adding together fields in the same column in access



phill952000
12-02-2008, 04:44 AM
Hi any help is much appriciated,

i have attatched a pic of what my report looks like in access and i am having a bit of trouble.

i want a field to calculate all the amounts in the Total Job Price column but i want it in the footer so that is only displayed once and not as many times as there are records.

the formula i have (which can be seen on the pic) works fine when it is in the main body of the report but this means it is displayed more than once.

when i put it into the footer all that is displayed is an #error

is there any solution to this?

regards

CreganTur
12-02-2008, 06:11 AM
Do you have grouping levels? If so then you need to put your forumula in the grouping level footer (the footer will be named for the field that comprises the grouping level). You're gettin an error because you're trying to put a calculated field in the Page Footer.

phill952000
12-02-2008, 07:33 AM
thanks for the reply,

i have not got grouping levels set up, i have tried but it is still not doing what i expect.

could you advise how to set this up so that i can calculate the Total Job Price fields once and have it at the bottom of them page?

regards

OBP
12-02-2008, 09:34 AM
You can put it in the Report Footer, or you can cheat (as I do) and have an unbound text box which has it's control source set to the "Total Job Price" but you set it's Running Sum to "Overall" or "Over Group".
This sums the records as they go down. You then have a Grand Total unbound text box box set to the "running sum" text box, which just picks up the last value. (You can also just have a second copy of the Total job Price to do the same thing)
The running sum text box can be set to "Invisible" = Yes.

phill952000
12-02-2008, 09:39 AM
thanks alot, putting it in the report footer work a treat.

my problem was i was putting the coding into the page footer

thanks again

OBP
12-02-2008, 10:48 AM
Phill, when you added the Grouping, did you tick the Group Footer in the Grouping and Sorting. Because that is where a Group Total should go.

phill952000
12-03-2008, 01:43 AM
I hadn't but i have now and it works a treat

many thanks