Calculate the total of a row in Access 2007

  • Thread starter Thread starter Mika1100
  • Start date Start date
M

Mika1100

I am trying to calculate the totals for rows in Access 2007. I know how to
add TOTALS row.
 
I am trying to calculate the totals for rows in Access 2007. I know how to
add TOTALS row.

Access *is not a spreadsheet*.

If your table is designed with multiple fields all of "the same kind" of data,
so that it is meaningful to add fields across a row, your table structure is
almost certainly WRONG. "Fields are expensive, records are cheap"; if you have
(say) fields for January, February, March, ..., December which you want to add
up for a year total, you need to redesign your table so that you have twelve
*records* in a table, not twelve fields!

That said... in a Query you can put in a calculated field. In a vacant Field
cell in the query grid type an expression like

RowTotal: NZ([field1]) + NZ([field2]) + NZ([field3])

The NZ function will treat a blank field as if it were a zero - by default any
expression involving a NULL value returns NULL.


if you're trying to do the sum in a Table... reread my first line above. You
cannot and should not do so.
 
John,

So I am having the same issue. I have a database that tracks the grades for my students. Our course has 7 tests so I created my table to show Block1Test....Block7Test. I have built the query to run listing all 7 test results but now need to figure out how to average the test scores for each student.
 
Back
Top