Organizational Hierarchy

dearsina

New member
Local time
Today, 13:03
Joined
Aug 18, 2004
Messages
7
I have a table with the following headers:

staffID | name | reportsToID

and I'm looking to create a report (or some form of texual output) that looks like this, based on the one table I have:

Employee name
-Employee name
-Employee name
--Employee name
-Employee name
-Employee name
-Employee name
--Employee name
--Employee name
---Employee name
---Employee name
-Employee name

[The actual formatting isn't that important, it's more about sorting the people out]

I have tried to search for the solution to this problem, but I'm unsure about the technical terminology, so I attribute my lack of results to my own limited understanding rather the answer not being out there.
I would be very greatful for code snippets or url's to similar questions answered. I'm running Access 2003.

sina
london
 
This is a perfect use for the treeview control if you want to display the data in a form. Access doesn't provide a nice hierarchy display method but visio does. I think you can automate Visio, Word, or Power Point to produce the report you want but I haven't done it so I can't offer any help. Let us know how you make out.

You might also search the web for "indented BOM" or "indented bill of material".
 
Do you have a fixed number of levels of subordination?
 
Pat Hartman said:
This is a perfect use for the treeview control if you want to display the data in a form.
I've read about TreeView, but unsure about how to take the data from it's current form and manipulate it in a way readable by the control. I've seen some documentation for it, but it's still a bit hazy to me, I don't even know where to find the TreeView ActiveX.

Pat Hartman said:
Access doesn't provide a nice hierarchy display method but visio does. I think you can automate Visio, Word, or Power Point to produce the report you want but I haven't done it so I can't offer any help. Let us know how you make out.
I've found a page on Microsoft that explains how to get an output from Visio (http://office.microsoft.com/en-us/assistance/HA010774641033.aspx), I think the catch is that I have to contain everything in Access, as the idea is to pass the mdb as a single file containing everything they need to the client. Also, I have a need to perform a few other calculations from the data, so it would be great if I could keep it in Access.

Pat Hartman said:
You might also search the web for "indented BOM" or "indented bill of material".
Will do, will post anything useful back here. Thanks for your help.
 
Last edited:
Have you succeeded?

Hi dearsina, have you succeeded ?
I'm trying to program a similar hierarchy here...
 

Users who are viewing this thread

Back
Top Bottom