View Full Version : Adding up columns on a report


stuart_adair
02-12-2009, 07:08 AM
Afternoon all,

Hopefully this is a nice simple one - Confusing the hell out of me.

I've got a report with a column called Days_Late. At the bottom of the report I want to display the sum of the column.

I've added a text box and in the control source entered =sum([days_late]) but that just gives me the #error message.

Help !!!
Stu

pbaldy
02-12-2009, 07:11 AM
Is that a field in the data source, or calculated? You can't sum a calculated control, so you'd have to recreate the calculation, like:

=Sum(Price * Quantity)

boblarson
02-12-2009, 07:14 AM
And, for a report if it is not a calculated field, make sure to refer to the field and not the text box.

stuart_adair
02-12-2009, 07:23 AM
The field Days_Late is calculated automatically but on a form, not on the report. On the report its just inserted as any other field.

Annoying thing is that when get Access to build a grouped report and select sum this field in the summary options it works and the formula looks the same - Just I hate the report layout.

pbaldy
02-12-2009, 07:25 AM
Make sure it's in the report footer rather than the page footer.

stuart_adair
02-12-2009, 07:28 AM
Cracked it - It was on the page footer and not the report footer - Thanks for your help :)