J
JMorrell
A super challenge... at least for me.
I have a form where a user (either a supervisor or an employee) can access
his or her Annual and Sick leave report (which shows balances, usage, etc).
I've got it set so that if the NT User (the logged on userID) is a
supervisor, I can capture their immediate employees and their employees’
reports. If any of these immediate employees are themselves supervisors, I
want to be able to run a query to bring up their data.
A real example: I have a Director (Bill), who has 4 supervisors (Lou, Rick,
Kathy, and Joe). Let's say that when the Bill logs on to his pc and opens
this reporting form, I want him to be able to look at the leave records for
himself, Lou, Rick, Kathy, and Joe as well as all the supervisors and/or
employees that report to Lou, Rick, Kathy, or Joe.
In addition, if Kathy logs on to her pc and opens the reporting form, I want
her to be able to look at her own leave records, and any supervisor and/or
employee that report to her or any of her supervisors.
The higher up in the hierarchy, the more leave reports they should see. Me,
being a mere employee, would be able to see just my records, and no one
else's. There can be any number of employees downstream, so to speak; but
there is a finite number of supervisors (thank goodness for that).
I have it working now that when Bill opens the report he can get the leave
records for Lou, Rick, Kathy, and Joe; but not anyone downstream of them.
I’m thinking I could run a query based on the results of another query. Each
employee has empID, IsSupervisor (yes/no), SupervisorID fields in their
record.
Any help in this endeavor is very much appreciated.
JMorrell
I have a form where a user (either a supervisor or an employee) can access
his or her Annual and Sick leave report (which shows balances, usage, etc).
I've got it set so that if the NT User (the logged on userID) is a
supervisor, I can capture their immediate employees and their employees’
reports. If any of these immediate employees are themselves supervisors, I
want to be able to run a query to bring up their data.
A real example: I have a Director (Bill), who has 4 supervisors (Lou, Rick,
Kathy, and Joe). Let's say that when the Bill logs on to his pc and opens
this reporting form, I want him to be able to look at the leave records for
himself, Lou, Rick, Kathy, and Joe as well as all the supervisors and/or
employees that report to Lou, Rick, Kathy, or Joe.
In addition, if Kathy logs on to her pc and opens the reporting form, I want
her to be able to look at her own leave records, and any supervisor and/or
employee that report to her or any of her supervisors.
The higher up in the hierarchy, the more leave reports they should see. Me,
being a mere employee, would be able to see just my records, and no one
else's. There can be any number of employees downstream, so to speak; but
there is a finite number of supervisors (thank goodness for that).
I have it working now that when Bill opens the report he can get the leave
records for Lou, Rick, Kathy, and Joe; but not anyone downstream of them.
I’m thinking I could run a query based on the results of another query. Each
employee has empID, IsSupervisor (yes/no), SupervisorID fields in their
record.
Any help in this endeavor is very much appreciated.
JMorrell