Jump to content

Recommended Posts

Posted

Hi, I'm trying to work out the best way to do this, either in SQL or VBA...

 

I have an Access database table with all of the staff in the school (containing fields USERNAME, JOBTITLE and LINEMANAGEDBY). The "linemanagedby" field is a reference to the username field. So for example, I can easily find out who line manages the head of ICT or all of the people that an assistant head line manages. This works perfectly.

 

Now onto the problem...I've been asked to extend the system so that I can find out "greater depths" of line management. So for example, the assistant head line manages the head of ICT, the head of ICT line manages the ICT teachers and one of the ICT teachers line manages an NQT in the department. I need the system to be able to search for the Assistant Head and return all of the people that they directly line manage, and all of the people that they "indirectly" line manage if you understand me.

 

I've started SQL queries and given up. I started to write a recursive function in VBA but gave up when it got stupidly complicated...

 

Any ideas? Thanks!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...