Calculating Totals

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My table contains hours against each area (Process, Mech/tech, Piping,
Des/Eng Mgt, etc). I am trying to run a report for each month that lists the
total for each area over that month. I have the date criteria that prompts
the user for start date and end date and that works fine.

The problem I am having is when I try to sum each of the areas. I tried the
following for each area in the page header but it comes up with an error:

=Sum([DES / ENG MGT])

I am only self taught on access so have limited knowledge. Any help you can
offer will be greatly appreciated.

Thanks Nic
 
Nic,
Is DesEndMgt (and other hours categories) the result of a calculation
performed on the report?
You can't add the results of an "unbound" calculated field in the report
footers.

I'm assuming that's the problem...
As an example... say you have Price and Qty fields, and want to show and
sum the calculated LineTotal (LineTotal = Price * Qty) on your report.
Create a calculated column in the query behind your report like this...
LineTotal : [Price] * [Qty]
Now you have created a new field (LineTotal) , and it's calculation is
"bound" to that field name. If you now place LineTotal on your report...
then in any footer...
=Sum(LineTotal)
will calculate properly.

Two other minor points...
Never name your sum field/s the same as any legitimate field name on the
report, and avoid spaces and special characters ( / ) in field names.
 
I think the issue is "for each area in the page header ". Totals of fields
and expressions can easily be calculated in Report and Group Headers and
Footers. Page Headers and Footers don't work without some fancy stuff.

--
Duane Hookom
MS Access MVP
--

Al Camp said:
Nic,
Is DesEndMgt (and other hours categories) the result of a calculation
performed on the report?
You can't add the results of an "unbound" calculated field in the report
footers.

I'm assuming that's the problem...
As an example... say you have Price and Qty fields, and want to show
and sum the calculated LineTotal (LineTotal = Price * Qty) on your report.
Create a calculated column in the query behind your report like this...
LineTotal : [Price] * [Qty]
Now you have created a new field (LineTotal) , and it's calculation is
"bound" to that field name. If you now place LineTotal on your report...
then in any footer...
=Sum(LineTotal)
will calculate properly.

Two other minor points...
Never name your sum field/s the same as any legitimate field name on the
report, and avoid spaces and special characters ( / ) in field names.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions



Nic said:
My table contains hours against each area (Process, Mech/tech, Piping,
Des/Eng Mgt, etc). I am trying to run a report for each month that lists
the
total for each area over that month. I have the date criteria that
prompts
the user for start date and end date and that works fine.

The problem I am having is when I try to sum each of the areas. I tried
the
following for each area in the page header but it comes up with an error:

=Sum([DES / ENG MGT])

I am only self taught on access so have limited knowledge. Any help you
can
offer will be greatly appreciated.

Thanks Nic
 
Back
Top