PC Review


Reply
Thread Tools Rate Thread

Calculate the total of a row in Access 2007

 
 
Mika1100
Guest
Posts: n/a
 
      3rd Mar 2008
I am trying to calculate the totals for rows in Access 2007. I know how to
add TOTALS row.
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      3rd Mar 2008
On Mon, 3 Mar 2008 07:54:02 -0800, Mika1100
<(E-Mail Removed)> wrote:

>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 W. Vinson [MVP]
 
Reply With Quote
 
New Member
Join Date: Nov 2011
Posts: 1
 
      8th Nov 2011
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2007 Visual Basic Running Total and Percent of Total.... Nikolai Microsoft Access VBA Modules 0 13th Nov 2008 03:10 PM
how do i calculate 10% of a total in an access query confussed student Microsoft Access Queries 2 25th Feb 2008 08:17 PM
calculate count on 2006 total, 2005 total, etc... =?Utf-8?B?QW1hbmRhIERlc2hvdGVs?= Microsoft Excel Worksheet Functions 6 28th Sep 2006 11:59 PM
How do I calculate a total amount on a form in Access. =?Utf-8?B?YWRpY2tzb24=?= Microsoft Access Forms 3 7th Jul 2005 08:20 PM
How Can I calculate a running total (prior total - expense)? =?Utf-8?B?VmljdG9y?= Microsoft Access Forms 0 5th Jul 2005 07:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:42 PM.