Help: Sum of Fields in Row (1 Viewer)

RainX

Registered User.
Local time
Today, 10:07
Joined
Sep 22, 2006
Messages
89
Hi all,

I know this might be easy but once again my mind is blanking out.
I have a query that outputs results as this


Name | S1 | S2 | S3 | S4

Lindy | 1 | 1 | 3 | 4

Rex | 5 | 4 | 3 | 2

...


I wanted to create another field called totals and have it output

Name | S1 | S2 | S3 | S4 | totals

Lindy | 1 | 1 | 3 | 4 | 9

Rex | 5 | 4 | 3 | 2 | 14

....


Can someone please help me with this?

Thanks in advance


P.s. I thought it would be simple as Total: [S1]+[S2]+[S3]+[S4], but for some reason its not working.
Im on access 2007, but i saved it as an access 2000 db
 
Last edited:

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:07
Joined
Aug 30, 2003
Messages
36,128
It should be as simple as that. How is it not working?
 

Bat17

Registered User.
Local time
Today, 18:07
Joined
Sep 24, 2004
Messages
1,687
I thought it would be simple as Total: [S1]+[S2]+[S3]+[S4], but for some reason its not working.
it is that easy. in what way is it 'not working'?
If you have missing values then you will have more of a challange.

Peter
 

RainX

Registered User.
Local time
Today, 10:07
Joined
Sep 22, 2006
Messages
89
Yes i did have missing values. I figured a way around it though.
I.e.

Totals: Nz([Field1],0)+Nz([Field2],0)+Nz([Field3],0)+Nz([Field4],0)

Take care!
 

Users who are viewing this thread

Top Bottom