Hi folks,
Another problem I'm hoping someone can help me with.
I have a table with two columns. The first contains a list of employee id's (one for each employee in the company) and the second contains the employee id to whom the employee in col1 reports to.
I would like to build a form with two list boxes. The first list box would contain a full list of employees. When an employee in list box 1 is selected, I would like the second list box to populate with all employee reporting into the selected employee (both directly and indirectly).
Filling Listbox 2 with those reporting directly is simple however I'm not so sure how to fill it with indirect reporting lines also.
I hope I'm making sense. By way of an example, if I select a company manager I would like to list all Asst. Mgr's reporting into that manager and in addition all supervisors reporting into those AM's, all employee's reporting into those supervisors etc. All this should be possible using the table mentioned above but my VBA skills are fairly rough still.
Any help with the code to build this list would be greatly appreciated. I imagine there's probably code out there somewhere already but I'm not sure what to search under.
Thanks, Dave
Another problem I'm hoping someone can help me with.
I have a table with two columns. The first contains a list of employee id's (one for each employee in the company) and the second contains the employee id to whom the employee in col1 reports to.
I would like to build a form with two list boxes. The first list box would contain a full list of employees. When an employee in list box 1 is selected, I would like the second list box to populate with all employee reporting into the selected employee (both directly and indirectly).
Filling Listbox 2 with those reporting directly is simple however I'm not so sure how to fill it with indirect reporting lines also.
I hope I'm making sense. By way of an example, if I select a company manager I would like to list all Asst. Mgr's reporting into that manager and in addition all supervisors reporting into those AM's, all employee's reporting into those supervisors etc. All this should be possible using the table mentioned above but my VBA skills are fairly rough still.
Any help with the code to build this list would be greatly appreciated. I imagine there's probably code out there somewhere already but I'm not sure what to search under.
Thanks, Dave