If Yes Query

G

Guest

Hello,

I am creating a time sheet database for my employees. I have a form that
shows the date, a subform where the employee selects their name, and another
subform where the employees input how many hours they work on each project in
a day. In this subform I want to have a check box that employees can check
off whether they worked in the office that day (as opposed to a field day).
So if a person works an office day they check yes. I then want this to equal
7.5 (hours) in the table and if they check no I want the field to equal 10
(hours). Therefore I can then calculate the amount of overtime (>7.5 hours
for office days, >10 hours for field days) by subtracting total hours worked
in a day by either 7.5 or 10 depending on whether it was an office or field
day.


I really have no idea about going about this, and I'm not even sure the most
efficient way of posting this question, so any help would be greatly
appreciated.


Thanks in advance.
 
G

Guest

It sounds like they can not record multiple projects in the same day or work
part of the day in the office and part of the day in the field.
Also this is a new one on me that overtime is computed different if indoors
or outside. Is this a union thing?

Try this ---
Over Time: IIF([OfficeDay] = -1, IIF([DayHours]-7.5 >0, [DayHours]-7.5, 0),
IIF([DayHours]-10 >0, [DayHours]-10, 0))

First it checks if it is an office day. Then if office day it check if more
than 7.5 hours. If over 7.5 then over is over time othe wise zero.
 

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