Queries - TechRepublic
Question
September 12, 2007 at 09:43 AM
mcrouse

Queries

by mcrouse . Updated 18 years, 10 months ago

I have an overtime database and once a year I need to rollback the overtime. I have a tblhours in which I store all the overtime hours and an overtime code which sorts out overtime worked, overtime refused, etc, etc. I am calculating the totals on the fly, which from everything I read you shouldn’t store the calculated data back in the table. My problem is once a year I need to rollback the overtime. I need to subtract the total hours worked from the lowest employee from each and every employee in his/her class–which is overtime codes 1, 4, and then I need to “0” out the refused overtime which is overtime codes 2, 5, 7 and that should give me a new year to date total. What is happening is If an employee has 10 hours worked 20 hours refused for a ytd of 30. It is giving me a negative. Is there a way to make a calculation and append that back to my tblhours?

This discussion is locked

All Comments