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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Total Calc. of hours at end of year and placing in another table.

Status
Not open for further replies.

merlin72

Programmer
Apr 18, 2000
50
US
I'm running access97. I wrote a database program to keep track of overtime hours for each day. I'm having a hard time figuring out how to calculate each employee's overtime at the end ogf the year and place it in another table labled LYOT(Last Years OverTime). I Also have a field labled Year so it keeps track of there overtime and the year they had it. <p>Thanks In Advance.<br><a href=mailto: > </a><br><a href= > </a><br>
 
ok, you're going to have to be a little more specific.<br>you have a table with a field that just tracks overtime hours? and you want to sum up that field and place the answer in a field in another table?<br><br>so is each day a record for each employee? each week? or is 1 employee a record, with the weeks going out across?<br><br>give us some detail of your table designs. <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
I can't understand why you would want to create a table to do the function of a query. If you just group by the year in a crosstab it will give you the total hours. Set employee name or Id as the row source, Date as the column source and then sum the hours it will give you what you want.
 
Table 1 ,Named OT , fields are ( ID,EmployeesName, OverTimeHrs.,DateOfOverTime.)<br>&nbsp;Table 2 Named LYTOT(Last Year Total OverTime)For each employee, Fields are (ID, EmployeesName, TotalOT.)<br><br>I want it to Calc. the OverTime For the Past Year and Store it in the second Table And also keep track of the year of the OverTime. <p>Thanks In Advance.<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top