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

Problem with overtime in two week period

Status
Not open for further replies.

allong

Technical User
May 2, 2003
40
US
I have created a time sheet. This time sheet is based on a two week period (80 hours). I need to show overtime hours for the first week based on a forty hour week and overtime hours for the second week based on forty hours. I have a text box giving me hours over forty, but this box is also adding in the hours for the second week. How can I split up my overtime hours.

IIf([Emphrs] >40, [Emphrs]-40,0) this works for first week. How do I get hours for second week without including the first weeks hours?
 
This depends on how your data is stored. Is it stored as daily hours, weekly hours, time intervals? Need more info.
 
wtmcknown hello. My data is stored as daily hours.
 
If you store your data as daily hours then you seem to be close already. You have a value([EmpHours]) that is apparently based on some query against your database. Query by date for week one total hours and use your iff function to calculate OT hours. Use the same query for week two but change the date criteria. If this advice is not helping then please reply with table structure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top