B
BrookieOU
This seems pretty simple, but I cannot figure it out or wrap my head around
it (I'm learning Access as I go and with a lot of help from these forums!).
I have a database for our employees. In the employees table I list all of
the vacation time, sick time and personal time they are alloted for the year
in separate columns (80 vacation, 40 sick and 16 personal). In another table
I am entering their leave time as they take it. The "Leave Table" is set up
as a lookup column for employee name (from the employee table) and a lookup
column for the reason (from typed in values: vacation, sick, personal).
What I am trying to do is run a query that will total the hours taken for
each person for each reason and then subtract those hours from the hours we
give them to give me a balance. I have been able to figure out how to do a
query that will total the hours for each person. What I can't do is figure
out how to do the calculations. I can't just put a calculation in a blank
field in the query because if I do the calculation [Sick Time]-[Hours] it
gives me an incorrect answer because the reason isn't always sick, it could
be vacation or personal. I think I could do it if I did separate queries for
each one -- sick, vacation and personal, but I want it combined on one report.
Does that make sense?
Thanks,
Brooke
it (I'm learning Access as I go and with a lot of help from these forums!).
I have a database for our employees. In the employees table I list all of
the vacation time, sick time and personal time they are alloted for the year
in separate columns (80 vacation, 40 sick and 16 personal). In another table
I am entering their leave time as they take it. The "Leave Table" is set up
as a lookup column for employee name (from the employee table) and a lookup
column for the reason (from typed in values: vacation, sick, personal).
What I am trying to do is run a query that will total the hours taken for
each person for each reason and then subtract those hours from the hours we
give them to give me a balance. I have been able to figure out how to do a
query that will total the hours for each person. What I can't do is figure
out how to do the calculations. I can't just put a calculation in a blank
field in the query because if I do the calculation [Sick Time]-[Hours] it
gives me an incorrect answer because the reason isn't always sick, it could
be vacation or personal. I think I could do it if I did separate queries for
each one -- sick, vacation and personal, but I want it combined on one report.
Does that make sense?
Thanks,
Brooke