Calculate the total of a row in Access 2007

M

Mika1100

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

John W. Vinson

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.
 
Joined
Nov 8, 2011
Messages
1
Reaction score
0
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.
 

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