Calculating SUM always displays #ERROR

G

Guest

This should be simple, right? Make a form, show the footer section, add a
field with the source being "=SUM([field on the details area])". However when
I do this I get #ERROR. AVG does the same thing.

1) no, I'm not calculating the SUM for calculated fields. the fields are in
the db
2) yes, there is valid data, in this case one record
3) yes, I've tried using both the DB field name and the form control name

Any ideas?
 
G

Guest

Roger Carlson said:
Is this a form or a report? In a report, you cannot put an expression in
the PAGE footer, just Details Footer and Report Footer.

It's a form. The fields in question are in the Form Footer.
 
G

Guest

Roger Carlson said:
Is the field name a reserved word like Date or something? (I'm grasping
here, because it should be working.)

Nope, QuantityField. And I tried quantity as well, which is the name of the
underlying field in the DB.

Two bugs in one day?!
 
K

Ken Snell [MVP]

What is the name of the control that has the SUM expression as its control
source?
 
G

Guest

Ken Snell said:
What is the name of the control that has the SUM expression as its control
source?

The control in the form is called "QuantityField", the field in the database
is called "quantity".
 
G

Guest

What's your datatype of the field you are trying to sum?
It must be numeric. That's all I can think of that would
cause this problem?
 
G

Guest

.... I should also note the same problem occurs for "price", "netAmount" and
"accruedInterest". I don't think this is an naming problem.
 
A

Andi Mayer

On Tue, 21 Dec 2004 11:52:25 -0800,

is this the same form or the application with the disapearing
controls?

if yes do a decompile

If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 
D

david epsom dot com dot au

Access calculates Sums like this by converting the underlying
query to an aggregate query. Try creating an aggregate query
with the Sum expression, to see if you can identify a problem
in the query.

(david)
 
G

Guest

david epsom dot com dot au said:
Access calculates Sums like this by converting the underlying
query to an aggregate query. Try creating an aggregate query
with the Sum expression, to see if you can identify a problem
in the query.

Oh geez, there's like 50 columns in this thing... oh well...
 
G

Guest

david epsom dot com dot au said:
Access calculates Sums like this by converting the underlying
query to an aggregate query.

Is there a way to capture the SQL it's generating?
 
G

Guest

:

SELECT sum(quantity) FROM tblTempSplits

Returns a valid result, no error. Can you provide more details of the sort
of query it will create? Will it make an individual select like this one, or
try to make an aggregate out of the form's select statement? If it's the
later, what does it group by?
 

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