BvCF
MIS
- Nov 11, 2006
- 92
Have two tables; Employees and Accounts. The fields within the Employees table are Employee_ID, Username, Password, Access_Level. The fields within the Accounts table are AcctOrig, AcctCurrent, AcctNo, AssignedTo, and Username.
Is it possible to use an update query to populate the "Username" field in the Accounts table and have the corresponding value for Employee_ID to populate the "AssignedTo" field in the Accounts table?
For example, something like;
Update Accounts
Set Username = [Enter User Name], AssignedTo = ?
where AssignedTo = ""
and AcctCurrent = [Enter Acct]
I have 4 employees (Sally, Kim, Sherry, and John) and the following accounts X90, X91, X92, X93, X94, X96, X98.
Sally is responsible for X90 and X91; Kim is responsible for X92; Sherry is responsible for X93 and X94 and John is responsible for X96 and X98.
Another thought is that maybe a update query with a case statement?? This may not be possible.
thanks for any assistance.
Is it possible to use an update query to populate the "Username" field in the Accounts table and have the corresponding value for Employee_ID to populate the "AssignedTo" field in the Accounts table?
For example, something like;
Update Accounts
Set Username = [Enter User Name], AssignedTo = ?
where AssignedTo = ""
and AcctCurrent = [Enter Acct]
I have 4 employees (Sally, Kim, Sherry, and John) and the following accounts X90, X91, X92, X93, X94, X96, X98.
Sally is responsible for X90 and X91; Kim is responsible for X92; Sherry is responsible for X93 and X94 and John is responsible for X96 and X98.
Another thought is that maybe a update query with a case statement?? This may not be possible.
thanks for any assistance.