Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating workhours per month

Status
Not open for further replies.

manos39

Programmer
Jan 26, 2011
8
0
0
Hello,
i would like some help in my database,

i want to calculate workhours during week then per month, for employes that works shifts aproximately 34 per week. The theoretical hours per emloyee is 34, and the real work hours show up already in a query sum [therhours]-[worhours] order by empolyee, week. ( i ve made a calculation for weeks to subtract a day (8,5 h) from theoretical 34 h per week, if there is a holiday there).
I would like some help for making a quey like Qrsyn that summarizes the "???????? ????" (34 OR 25,5 etc - WORK HOURS ) for an employee, which would add the values on the same employee on the next record, (ouff sorry about my english)
Second i d love to have that series of records (with the sums) as a subform to my form {main}..
I appreciate some help
I am ataching the database zipped.
 
I have made a link to the database for downloadif that s convinient.
 
code of my query is:

SELECT ypaliloi.???????, Format([??????????????],"yyyy-mm-ww") AS [??? ????????], Sum([???????????]+[????]) AS [???? ??????????? ???????? ?????????], Count(argies.?????) AS ?????, (34-([?????]*8.5)) AS [?????????? ?????????], [???? ??????????? ???????? ?????????]-[?????????? ?????????] AS [???????? ????]
FROM ypaliloi INNER JOIN (eidiyphresion INNER JOIN ((ypiresies INNER JOIN ores ON ypiresies.??????ID = ores.????ID) LEFT JOIN argies ON ypiresies.?????????????? = argies.?????) ON eidiyphresion.????????ID = ypiresies.????????ID) ON ypaliloi.?????????ID = ypiresies.???????ID
GROUP BY ypaliloi.???????, Format([??????????????],"yyyy-mm-ww")
HAVING (((ypaliloi.???????)=[Forms]![main]![???????]) AND ((Format([??????????????],"yyyy-mm-ww"))=[Forms]![main]![Text???]))
ORDER BY Format([??????????????],"yyyy-mm-ww");

========================================================
translation from greek if it helps:
=======================================
??????? = surname
?????????????? =workday
??? ????????= per week
???????????= standard workhours (weekly)
????= hours
???? ??????????? ???????? ?????????= real workhours per week
?????= holiday
?????????? ?????????= theoretical hours of the week
???????? ????= hours total
=============================================
i would like to have a query that sums per month ???????? ????(= hours total) for an employee, and the result value in a field that would keep the resut of hours and would be added by the next result by next month of every employee.
Thak you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top