Leave Bal

bygracethrufaith

New member
Local time
Today, 11:21
Joined
Sep 25, 2013
Messages
3
I have been :banghead:on this and can't seem to find exactly what I'm looking for. I have a table that has Vacation Bal (Hrs) and a table that has Vacation hours taken. I am trying to create a query with Emp_ID, Date, Time_Used, Vacation_Bal, Bal_Remaining. With the Bal_Remaining field keeping a running total of the vacation hours remaining. Please help. I am new at this stuff. If I have worded this wrong I apologize. By the way for the Bal_Remaining I took Vacation_Bal - Time_Used, did group by and used Expressions. This did not work
 
I've attached an example you can review to see if it can help with your program. In general, it's not good practice to store a calculated value, such as vacation balance, instead use queries to do calculations and use that result for a form or report. My example contains 3 tables:

Employee table
Employee vacation hours per year
Employee vacation hours taken

It also contains 2 queries, 1 to determine how many hours have been taken per year and a second to determine the balance of hours per year.
 

Attachments

So far looks pretty good, and I like it, but what if I wanted to see something like this in a query:

Joe Smith, 9/21/13, 2, 40
Joe Smith, 9/22/13, 8, 32
Joe Smith, 9/23/13, 3.5, 28.5
 
I've added another query, qryDetermineVacBalanceByDay, that shows it by day.
 

Attachments

Users who are viewing this thread

Back
Top Bottom