Summing the fields in a Query

  • Thread starter Thread starter Lin
  • Start date Start date
L

Lin

I have a query with fields showing below.

Mfr Model 1984 1985 1986 1987 1988 1989 ...........................2008

I need to sum the field from 1984 to 2003 and put that in one field. When I
tried this function (Sum[1984]+[1985]+...............+[1990], it is working,
the problem is it is not fit in one fields (Access summing only 7 fields). So
I broke it down and made 3 fields and try to make another query to summing
them again. The first query is working fine, when I try to summing the second
one (which basically coming from the first one with three fileds & trying add
the three fields) it is not working. any one know, why? Any help, really
appreciated.

Thank you
 
I don't necessarily agree with your table structure that requires summing
across fields rather than across records. However if any value is null, then
the total value becomes null. You can generally get around this with:
Sum(Nz([1984],0) + Nz([1985],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