Adding Calculated fields (1 Viewer)

M

mslatter

Guest
I am relatively new to Access so forgive me if this is a stupid question. I am creating a report that pulls data from my Man Hour table. Each day, employees hours will be added to the table.

If I have a report that shows each Employee's hours by week 1 and week 2, and then want to total them up for a Period Total (week 1 & 2), how can I total the actual 'controls' for each week. E.g. If an employee worked 45 hours in week one, my control total for week one shows 40 regular hours and then a seperate control shows 5 hours overtime. Then if they work 40 hours in week 2, how can I total week 1 and 2 to show 80 regular hours and 5 hours overtime?
I see the controls I want added on my report but am having a really hard time telling access how I want them totalled. All I can get it to do is total all the records to show 85 hours.

Any help is very much appreciated.

MSSS
 
R

Richie

Guest
Add a text box to the report, set its control source to =[Field1]+[Field2],set running sum over group.
 
M

mslatter

Guest
Thanks Richie, I don't think I explained myself very well. I have for example, 5 employees with payroll figured out by week and added together for every 2 weeks. So for example:

Employee 1
Week 1
Mon 8hrs
Tue 8hrs
Wed 8hrs
Thur 8hrs
Fri 8hrs
Sat 8hrs
------------------------------------
Totals 40 Regular 8 Overtime Reg$ OT$

Week 2
Mon 8hrs
Tue 8hrs
Wed 8hrs
---------------------------------------------
Totals 24 Regular 0 Overtime Reg$ OT$
-------------------------------------------------------------
Period Totals 64 Regular 8 Overtime Reg$total Reg$OT

Next Employee....e.t.c.
(I don't know how this will look on the site? Hopefully readable.)

Adding the hours for the week is easy. Except if they are over 40, then the control must show only 40. I have this working, but now I need to be able to add the controls that shows Totals in each week to a sum for the period. All attempts have given me wrong numbers to date. It keeps trying to add up all the records into a sum, instead of the numbers in my controls.

I would have thought I could figure this one out since it looks SO much like excel, but have spent literally hours on it. Hope that makes sense and there is an easy answer.

Thanks again...MSSS
 
R

Richie

Guest
Assuming you group by employee from the previous example set the control source to =[Totals] runn sumover group.
 

Users who are viewing this thread

Top Bottom