Weekly total hours from daily work record form ?

K

Ken

I'm new to Access 2003 and as a first project I'm making a daily work
record, up to now on the form the "Week Number" is calculated from the
"Start Date" and the worked hours are calculated from the "Start
Time", "Finish Time" and "Breaks", so far everything is working fine,
I'm trying to add a field in the form with a function that will show
the daily accumulated worked hours for each week based on the week
number ie: "Week 8 = 40 total hours" or "Week 8 = 40 hours over 5
shifts", I believe I somehow need to sum the "Worked Hours" for all
the form pages with the same "Week Number", I'm completely stuck on
this and could do with a pointer or two, so what's the best way to go
about this.

Thanks for taking the time to read.
 
G

Guest

Ken:

It's difficult to picture what you are trying to do, and how your form(s)
are laid out. However, I am curious if you have the work data stored in a
table, with the associated week number? If so, you may be able to do
something like this:

DMax("HoursWorked", "tblHoursWorked", "Week = 8 and Employee = <EmpNameHere>")

Otherwise, please try and post more specific information about your project,
so that we may be better able to assist you.

Sharkbyte
 
K

Ken

Sorry If I wasn't clear, the database is a time sheet to record times
worked on a daily basis amongst other things, ie; Date, time started
work, time finished work, breaks, total hours worked ec't.

In the table are fields : Start Date, Finish Date, Start Time, Finish
Time, Week Number, Worked Hours amongst others.

The form has fields for all of the above plus other fields unrelated
to date/time, the "Worked Hours" are automatically calculated from the
input of [Finish Time]-[Start Time]-[Breaks], The "Week Number" is
automatically calculated from the "Start Date", I would now like to
insert a field into the form to show the worked Hours for the Week so
that when data is put into a new page (new work shift) the field will
show the accumulated total hours worked for the week (Sunday to
Saturday).

For instance we're currently at the beginning of calendar week 10, If
I worked 8 hours a day this week when I input the times for Monday the
"Weekly Total" field on the form will show 8, after inputting the
times for Tuesday the "Weekly Total" would increase to 16 and so on
for each day untill the beginning of calendar week 11 when the process
would start again from 0, the same amount of hours aren't worked for
each day the above is for explanation purposes only.

Also I've just noticed that the week number although updating in the
form the values aren't showing in the Table datasheet.
 

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