Doing a "SUM" within a report

G

Guest

I have created a Report in Access for generating a daily time sheet. The
report is being created from a query. In the report is a field called HOURS.
Time is assigned to individual projects and each is listed on the report
showing the hours worked on that project. I would like to add a field on the
report called "TOTAL HOURS". Total Hours would be based on the sum of the
individual hours being shown on the report. Can I do a sum within the report
based on the hours worked being displayed on the report? If so how.
 
T

tig

MV,

Create a text box in either your group or report footer. The value
will be @sum([Hours]).

HTH
 
D

Duane Hookom

You can total any numeric field in a Report or Group Header or Footer
section. Use a control source of a text box like:

=Sum([Your Numeric Field])

Date/Time fields are also numeric although they should be used to
store/display a point in time and not a duration of time.
 
G

Guest

Thank you for the responce. I have tried both your suggestion and the
suggestion provided by TIG. In both instances I receive #Error in the TOTAL
HOURS field when I run the report. I have entered =Sum([Hours]) in a text box
and it is located in the Page Footer. I am not sure as to what I am doing
wrong.

Duane Hookom said:
You can total any numeric field in a Report or Group Header or Footer
section. Use a control source of a text box like:

=Sum([Your Numeric Field])

Date/Time fields are also numeric although they should be used to
store/display a point in time and not a duration of time.

--
Duane Hookom
MS Access MVP
--

MValentine said:
I have created a Report in Access for generating a daily time sheet. The
report is being created from a query. In the report is a field called
HOURS.
Time is assigned to individual projects and each is listed on the report
showing the hours worked on that project. I would like to add a field on
the
report called "TOTAL HOURS". Total Hours would be based on the sum of the
individual hours being shown on the report. Can I do a sum within the
report
based on the hours worked being displayed on the report? If so how.
 
D

Duane Hookom

As I stated, this works in Report or Group sections, not Page sections. Do
you really need this in a Page Footer or can you use the Report Footer?

Regarding TIG's reply, there is no "@sum([Hours])" functionality in Access
reports. I think the "@" is from some other application, perhaps Lotus 1-2-3
or other.

--
Duane Hookom
MS Access MVP
--

MValentine said:
Thank you for the responce. I have tried both your suggestion and the
suggestion provided by TIG. In both instances I receive #Error in the
TOTAL
HOURS field when I run the report. I have entered =Sum([Hours]) in a text
box
and it is located in the Page Footer. I am not sure as to what I am doing
wrong.

Duane Hookom said:
You can total any numeric field in a Report or Group Header or Footer
section. Use a control source of a text box like:

=Sum([Your Numeric Field])

Date/Time fields are also numeric although they should be used to
store/display a point in time and not a duration of time.

--
Duane Hookom
MS Access MVP
--

MValentine said:
I have created a Report in Access for generating a daily time sheet. The
report is being created from a query. In the report is a field called
HOURS.
Time is assigned to individual projects and each is listed on the
report
showing the hours worked on that project. I would like to add a field
on
the
report called "TOTAL HOURS". Total Hours would be based on the sum of
the
individual hours being shown on the report. Can I do a sum within the
report
based on the hours worked being displayed on the report? If so how.
 
G

Guest

I found MY mistake. I was placing the =Sum([Hours]) in the Page Footer. I
should have been placing it, as was suggested, in the REPORT FOOTER.

Thanks

Duane Hookom said:
You can total any numeric field in a Report or Group Header or Footer
section. Use a control source of a text box like:

=Sum([Your Numeric Field])

Date/Time fields are also numeric although they should be used to
store/display a point in time and not a duration of time.

--
Duane Hookom
MS Access MVP
--

MValentine said:
I have created a Report in Access for generating a daily time sheet. The
report is being created from a query. In the report is a field called
HOURS.
Time is assigned to individual projects and each is listed on the report
showing the hours worked on that project. I would like to add a field on
the
report called "TOTAL HOURS". Total Hours would be based on the sum of the
individual hours being shown on the report. Can I do a sum within the
report
based on the hours worked being displayed on the report? If so how.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top