Hello everybody,
I am over my head with this problem.
I have a table that has details of staff at my workplace. I am using access to calculate the impact of staff movement on our budgeted salary. Thus, I have set up a system in which managers can use some forms to transfer, reclassify or add new staff. My table has flags (Reclass/New/Transfer) and also the month the changes will take place (NewMonth,ReclassMonth,TransferMonth).
From this table, I would want to be able to get a report that shows the base salary at the beginning of the year and each month's salary, taxes and bonuses. (Denormalized structure)
Initially, I made separate queries to get the incremental salary, taxes and bonuses and then use another query to sum each component up and added it to a base salary from another table(this table is maintained by the HR people).
For example, 1 query to calculate the new staff costs, transfer staff costs and reclassified staff costs. Then from this query, I break it up into a denormalized structure via a sum of a dlookup on incremental salary/tax (NewMonth etc..) This would be another 4 queries. And at the end, I have one query that adds up the results of the previous 4 queries (BaseSalary + Incremental New Staff Salary + Incremental Reclass Salary + Incremental Transfer In Salary + Decremental Transfer Out Salary). In the end, I ended up with almost 50 queries!
I find it cumbersome and set on redoing the whole process based on the same logic. By using nested iifs and dlookups, I can get to my final answer
with only 3 queries but the dlookups takes up too much time.
I am hoping for a faster way to get my final results without the large number of queries!
Would anyone have any idea of what I am talking about? Haha.
Please do help!
Rgds,
k.
I am over my head with this problem.
I have a table that has details of staff at my workplace. I am using access to calculate the impact of staff movement on our budgeted salary. Thus, I have set up a system in which managers can use some forms to transfer, reclassify or add new staff. My table has flags (Reclass/New/Transfer) and also the month the changes will take place (NewMonth,ReclassMonth,TransferMonth).
From this table, I would want to be able to get a report that shows the base salary at the beginning of the year and each month's salary, taxes and bonuses. (Denormalized structure)
Initially, I made separate queries to get the incremental salary, taxes and bonuses and then use another query to sum each component up and added it to a base salary from another table(this table is maintained by the HR people).
For example, 1 query to calculate the new staff costs, transfer staff costs and reclassified staff costs. Then from this query, I break it up into a denormalized structure via a sum of a dlookup on incremental salary/tax (NewMonth etc..) This would be another 4 queries. And at the end, I have one query that adds up the results of the previous 4 queries (BaseSalary + Incremental New Staff Salary + Incremental Reclass Salary + Incremental Transfer In Salary + Decremental Transfer Out Salary). In the end, I ended up with almost 50 queries!
I find it cumbersome and set on redoing the whole process based on the same logic. By using nested iifs and dlookups, I can get to my final answer
with only 3 queries but the dlookups takes up too much time.
I am hoping for a faster way to get my final results without the large number of queries!
Would anyone have any idea of what I am talking about? Haha.
Please do help!
Rgds,
k.