Adding total of columns, row by row

mattster2020

New member
Local time
Today, 12:27
Joined
Jun 13, 2008
Messages
2
Good Morning,

I have a subform that holds data of hours worked for each day, for example:

Monday Tuesday Wednesday Thursday Friday Total
8 8 8 8 8
8 8 8 8 8

I would like to know how to tally up monday to friday and have the total displayed in the total field. I would like this to be totalled for each row as there will be multiple entries.

Any help would be appriecated.

Cheers,

Matt
 
My guess is, is that you will have to do some sort of query that will add them together.

TotalHours:Mon+Tue+Wed+Thu+Fri

and then you will be able to display the TotalHours field
 
Thanks dude, that gave me the idea for the following, this has to be used in the control source of the textbox:

=sum([Monday])+([Tuesday])+([Wednesday])+([Thursday])+([Friday])

Cheers,

Matt
 
You don't need the Sum() unless you are aggregating rows and if you may have null values, you'll need to use the Nz() function.

=Nz(Monday,0)+Nz(Tuesday,0)+Nz(Wednesday,0)+Nz(Thursday,0)+Nz(Friday,0)

Do Saturday and Sunday not exist in your universe? I don't recommend a non-normalized structure (which is what you have) but at least include all 7 days.
 

Users who are viewing this thread

Back
Top Bottom