Hi,
I am trying to make an update query that updates multiple fields from another table.
Basically it holds the relational data for staff using job codes and in my database I also hold the employee number for each of the 6 relationships per job.
Every job has 6 relationships:
Manager
Expenses Authoriser
Timesheets Authoriser
Training Authoriser
Leave Authoriser
Special Leave Authoriser
The HR system has a table called REL that holds the Job Code the relationship is for and then the job code of the person who is in the role of the 6 relationships above.
My job code management database also holds this data but has the employee number as well as the job code for each of the 6 relationships.
When a change is made e.g. if a person in 1 of the 6 relationship positions moves to say a different department and someone else moves in to their role, I need a way of updating the employee numbers for each of the 6 relationships on the table in my database.
Can anyone explain how I can get my table "AUTH" to update each of the relationships employee ID fields:
[Manager ID]
[Expenses Auth ID]
[Timesheet Auth ID]
[Training Auth ID]
[Leave Auth ID]
[SP Leave Auth ID]
By finding the [EMP_ID] from my database view [TMC_POS_MPO]
Where
[AUTH]![Manager Job]=[TMC_POS_MPO]![POS_NUMBER]
[AUTH]![Expense Auth Job]=[TMC_POS_MPO]![POS_NUMBER]
[AUTH]![Timesheet Auth Job]=[TMC_POS_MPO]![POS_NUMBER]
[AUTH]![Training Auth Job]=[TMC_POS_MPO]![POS_NUMBER]
[AUTH]![Leave Auth Job]=[TMC_POS_MPO]![POS_NUMBER]
[AUTH]![SP Leave Auth Job]=[TMC_POS_MPO]![POS_NUMBER]
I am trying to make an update query that updates multiple fields from another table.
Basically it holds the relational data for staff using job codes and in my database I also hold the employee number for each of the 6 relationships per job.
Every job has 6 relationships:
Manager
Expenses Authoriser
Timesheets Authoriser
Training Authoriser
Leave Authoriser
Special Leave Authoriser
The HR system has a table called REL that holds the Job Code the relationship is for and then the job code of the person who is in the role of the 6 relationships above.
My job code management database also holds this data but has the employee number as well as the job code for each of the 6 relationships.
When a change is made e.g. if a person in 1 of the 6 relationship positions moves to say a different department and someone else moves in to their role, I need a way of updating the employee numbers for each of the 6 relationships on the table in my database.
Can anyone explain how I can get my table "AUTH" to update each of the relationships employee ID fields:
[Manager ID]
[Expenses Auth ID]
[Timesheet Auth ID]
[Training Auth ID]
[Leave Auth ID]
[SP Leave Auth ID]
By finding the [EMP_ID] from my database view [TMC_POS_MPO]
Where
[AUTH]![Manager Job]=[TMC_POS_MPO]![POS_NUMBER]
[AUTH]![Expense Auth Job]=[TMC_POS_MPO]![POS_NUMBER]
[AUTH]![Timesheet Auth Job]=[TMC_POS_MPO]![POS_NUMBER]
[AUTH]![Training Auth Job]=[TMC_POS_MPO]![POS_NUMBER]
[AUTH]![Leave Auth Job]=[TMC_POS_MPO]![POS_NUMBER]
[AUTH]![SP Leave Auth Job]=[TMC_POS_MPO]![POS_NUMBER]