Sum() function in report returns #Error in Access 2000

G

Guest

I am trying to create a report to generate an invoice, and I need it to total
my fees in a reasonable manner. In the detail section of my report I have a
control that is bound to the source [Fee] from my query, which lists my fee
for each date of services provided. (The name of this control in the report
is [Text25]).

I would like, following the list of amounts, to list a total sum for the
invoice. I tried placing a control in the page footer with the expression
=Sum([Fee]), but that returned a value of #Error. I tried =Sum([Text25]),
but got the same results. I tried placing =Sum([Fee]) in the detail section
and I got an accurate total, but it listed the total after each line entry of
DATE-HOURS-FEE which isn't especially useful to me.

What is the underlying problem, and what is the best way to fix it, please?
 
F

fredg

I am trying to create a report to generate an invoice, and I need it to total
my fees in a reasonable manner. In the detail section of my report I have a
control that is bound to the source [Fee] from my query, which lists my fee
for each date of services provided. (The name of this control in the report
is [Text25]).

I would like, following the list of amounts, to list a total sum for the
invoice. I tried placing a control in the page footer with the expression
=Sum([Fee]), but that returned a value of #Error. I tried =Sum([Text25]),
but got the same results. I tried placing =Sum([Fee]) in the detail section
and I got an accurate total, but it listed the total after each line entry of
DATE-HOURS-FEE which isn't especially useful to me.

What is the underlying problem, and what is the best way to fix it, please?

See Microsoft KnowledgeBase article:
132017 "How to sum a column of numbers in a report by page"
 
G

Guest

I looked at article 132017 before I posted. I couldn't understand it because
I do not know VBA. Plus, the summary states:

"SUMMARY
In a Microsoft Access report, you can sum a column of numbers by group or
over the entire report, but there is no built-in way to print the sum of a
column on each page of a report. This article shows you how you can use code
to print the sum of a column of numbers on each page of a report. "

I do not want to print the sum on each page of the report. I only want one
total printed at the bottom of the report.

(I'm afraid I will need an answer explained simply. I took a free crash
course in Access basics once and used that to patch up an existing badly
created database, but this is the first DB I have ever made from scrach.)

fredg said:
I am trying to create a report to generate an invoice, and I need it to total
my fees in a reasonable manner. In the detail section of my report I have a
control that is bound to the source [Fee] from my query, which lists my fee
for each date of services provided. (The name of this control in the report
is [Text25]).

I would like, following the list of amounts, to list a total sum for the
invoice. I tried placing a control in the page footer with the expression
=Sum([Fee]), but that returned a value of #Error. I tried =Sum([Text25]),
but got the same results. I tried placing =Sum([Fee]) in the detail section
and I got an accurate total, but it listed the total after each line entry of
DATE-HOURS-FEE which isn't especially useful to me.

What is the underlying problem, and what is the best way to fix it, please?

See Microsoft KnowledgeBase article:
132017 "How to sum a column of numbers in a report by page"
 
J

John Spencer

Add a report footer and add a control to the report footer with a source of
=Sum(Fee)

You can't put that in the page footer, it will not work.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

KT Huggs said:
I looked at article 132017 before I posted. I couldn't understand it
because
I do not know VBA. Plus, the summary states:

"SUMMARY
In a Microsoft Access report, you can sum a column of numbers by group or
over the entire report, but there is no built-in way to print the sum of a
column on each page of a report. This article shows you how you can use
code
to print the sum of a column of numbers on each page of a report. "

I do not want to print the sum on each page of the report. I only want
one
total printed at the bottom of the report.

(I'm afraid I will need an answer explained simply. I took a free crash
course in Access basics once and used that to patch up an existing badly
created database, but this is the first DB I have ever made from scrach.)

fredg said:
I am trying to create a report to generate an invoice, and I need it to
total
my fees in a reasonable manner. In the detail section of my report I
have a
control that is bound to the source [Fee] from my query, which lists my
fee
for each date of services provided. (The name of this control in the
report
is [Text25]).

I would like, following the list of amounts, to list a total sum for
the
invoice. I tried placing a control in the page footer with the
expression
=Sum([Fee]), but that returned a value of #Error. I tried
=Sum([Text25]),
but got the same results. I tried placing =Sum([Fee]) in the detail
section
and I got an accurate total, but it listed the total after each line
entry of
DATE-HOURS-FEE which isn't especially useful to me.

What is the underlying problem, and what is the best way to fix it,
please?

See Microsoft KnowledgeBase article:
132017 "How to sum a column of numbers in a report by page"
 
G

Guest

Use the Report Footer, rather than the page footer, to place your sum text
box. Also, be sure that there is no circular reference. Text box fee and
sum of fee need to have different names.
 

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