I've been assigned the task of tracking vacation hours for a small group of employees out in California. California has some interesting rules about employee vacation, among which is that once time has been earned, it stays available to that employee until they use it or are no longer employed (where it would be paid out).
The attached tables.txt is a csv with my tables and structure. I'm using access 2007.
Now, here's where my headache comes in. Once an employee has reached a set cap, they no longer accrue hours until they use their time and drop below the cap; at which point they start accruing again (from the time they went below the cap, not where they first hit the cap).
I know it isn't considered best practice to store a calculated value in a table, but I don't see much choice. What I'm trying to make happen is to set the vac_earned field to equal [agents].[vac_accrual] x sum( [accrual].[earned] ). I'll be using that value to decide whether [agents].[accrue_stop] is on or off.
I'm not concerned about out-of-sync data because I intend to run the calculation as part of the autoexec macro and I'll be the only one using the database.
When I try to run the update query, it either tells me the operation must use an updatable query or that
You tried to execute a query that does not include the specified expression <name> as part of an aggregate function.
:banghead:
Any thoughts?
The attached tables.txt is a csv with my tables and structure. I'm using access 2007.
Now, here's where my headache comes in. Once an employee has reached a set cap, they no longer accrue hours until they use their time and drop below the cap; at which point they start accruing again (from the time they went below the cap, not where they first hit the cap).
I know it isn't considered best practice to store a calculated value in a table, but I don't see much choice. What I'm trying to make happen is to set the vac_earned field to equal [agents].[vac_accrual] x sum( [accrual].[earned] ). I'll be using that value to decide whether [agents].[accrue_stop] is on or off.
I'm not concerned about out-of-sync data because I intend to run the calculation as part of the autoexec macro and I'll be the only one using the database.
When I try to run the update query, it either tells me the operation must use an updatable query or that
You tried to execute a query that does not include the specified expression <name> as part of an aggregate function.
:banghead:
Any thoughts?