Problem with SUM Function

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

Guest

Hi,
In my report I am using a SUM function but instead of adding the values it
just lists them.

Example :
Value a-1
Value b- 2
Value c-6
SUM should be : 9
But Access is displaying: 126

Any suggestions?

Thanks.
 
Since Access believes these values are Text (not numbers), it is
concatenating them instead of summing them.

The solution will therefore be to typecast the value to one of the numeric
types, e.g. CLng() for whole numbers.

More info:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html
 
What did yo use to add up the values?

If the field type is text and you used:
=[a] + + [c]
Then it will list the values, it add a string to a string.
If that the case, change it to
=Val(Nz([a],0)) + Val(Nz(,0)) + Val(Nz([c],0))

Changing it to number, and using the Nz to replace Null to 0
 

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

Back
Top