BvCF
MIS
- Nov 11, 2006
- 92
Have a Access Db that approximately 8 employees use. I only allow the employees to view his/her accounts based on their username as displayed in the "AssignedTo" field.
For example, the control source for the textboxes on the main form is a query similar to the following;
SELECT tblAllAccounts.AccountOrig, tblAllAccounts.AccountCurrent, tblAllAccounts.AccountNo, tblAllAccounts.LastName,tblAllAccounts.FirstName, tblAllAccounts.TotChg,
FROM tblAllAccounts
WHERE (((tblAllAccounts.AssignedTo) in (select employee_id from Employee_List) or
(tblAllAccounts.AssignedTo)=0));
Now, the challenge is when the Manager desires to maintain a history of the assignment of accounts. In other words,
accounts can be assigned several times - when a employee retires, terminates or goes on an extended vacation.
Therefore,I need to add several additional fields such as
ReassignedTo1
DateReassignedTo1
ReassignedTo2
DateReassignedTo2
ReassignedTo3
DateReassignedTo3
For example, Mary was initially assiged to accounts 1, 2, and 3. If Mary terminates, the accounts that were initially assigned to Mary should be re-assigned to Sally. If Sally goes on extended leave, the accounts then should be re-assigned to John.
Therefore, how should the query stated above be modified so that the reassigned person is the only person that will be
able to view the accounts. The person that was assigned the account previously should not be able to view the account once it has been re-assigned.
It appears that I need to include "ReassignedTo1", "ReassignedTo2", and "ReassignedTo3" in the query similar to the
following;
Update tblAllAccounts
Set "ReassignedTo1" = "Sally"
where "AssignedTo" = "Mary"
and DateReassigned1 = sysdate
Thanks in advance for any insight to this problem.
For example, the control source for the textboxes on the main form is a query similar to the following;
SELECT tblAllAccounts.AccountOrig, tblAllAccounts.AccountCurrent, tblAllAccounts.AccountNo, tblAllAccounts.LastName,tblAllAccounts.FirstName, tblAllAccounts.TotChg,
FROM tblAllAccounts
WHERE (((tblAllAccounts.AssignedTo) in (select employee_id from Employee_List) or
(tblAllAccounts.AssignedTo)=0));
Now, the challenge is when the Manager desires to maintain a history of the assignment of accounts. In other words,
accounts can be assigned several times - when a employee retires, terminates or goes on an extended vacation.
Therefore,I need to add several additional fields such as
ReassignedTo1
DateReassignedTo1
ReassignedTo2
DateReassignedTo2
ReassignedTo3
DateReassignedTo3
For example, Mary was initially assiged to accounts 1, 2, and 3. If Mary terminates, the accounts that were initially assigned to Mary should be re-assigned to Sally. If Sally goes on extended leave, the accounts then should be re-assigned to John.
Therefore, how should the query stated above be modified so that the reassigned person is the only person that will be
able to view the accounts. The person that was assigned the account previously should not be able to view the account once it has been re-assigned.
It appears that I need to include "ReassignedTo1", "ReassignedTo2", and "ReassignedTo3" in the query similar to the
following;
Update tblAllAccounts
Set "ReassignedTo1" = "Sally"
where "AssignedTo" = "Mary"
and DateReassigned1 = sysdate
Thanks in advance for any insight to this problem.