The Recursive Tree Thing

Thales750

Formerly Jsanders
Local time
Today, 05:50
Joined
Dec 20, 2007
Messages
3,346
There used to be a Tree Tool in the toolbox, it was horribly executed and probably deprecated because of that.


I'm building a Recursive Lookup filtering structure where a single table has unlimited layers of sub-filters. This would display data in a format similar to File Folders Displays in Windows.
 
The Tree View has never been a native Access Control. It is an Active X control is the MCSCOMCTL.OCX. That very long thread discusses where to find the control and how to download it if you need to find it. My class code will save you days of learning in order to load and work with a tree view.
 
The Tree View has never been a native Access Control. It is an Active X control is the MCSCOMCTL.OCX. That very long thread discusses where to find the control and how to download it if you need to find it. My class code will save you days of learning in order to load and work with a tree view.
I'm aware it was Active X. And I'm not asking where to find it. It was the very worst of what was wrong with Active X.
I was actually hoping for some modern alternative, and wondering they even exist.

I gather you have some kind of way to make a Tree. I would like to learn more about that, if you please.
 
I gather you have some kind of way to make a Tree. I would like to learn more about that, if you please.
Did you read the post?? That was the whole point in the beginning of the post to teach how to create tree views (before it got very long on a specific solution). I cannot recreate all of that here for you. It also shows a solution using another third party treeview built on native MS Forms controls.
 
Did you read the post?? That was the whole point in the beginning of the post to teach how to create tree views (before it got very long on a specific solution). I cannot recreate all of that here for you. It also shows a solution using another third party treeview built on native MS Forms controls.
Do you purposely misunderstand people?
 
purposely misunderstand people?
Sorry, I try not to, But I guess I am not sure then what you are asking then. The way I read your response:
I would like to learn more about that, if you please.
was that you did not have time to read the link and wanted me to spoon feed something to you. If you are looking for a way to build a native tree view using only Access controls I do not have a solution and no one does. You could do a poor fake using a listbox and indenting the levels, for something small.
I gather you have some kind of way to make a Tree.
That thread has very detailed explanations how I use a class module to make loading the tree view and working with it easy. It outlines about every feature you can apply to a treeview. Images, right click menus, drag and drop, returning manual sort orders, recursive calls, returning child nodes, expand and collapse code, dynamically loading....
It does not build it with native access controls if that is what you are asking. That does not exist anywhere and cannot be done.
I do demo in that thread how this can be done using MSFORMS which is "theoretically" more stable for distribution.
I do not find the treeview to be great and it has some quirks, but I would not say it is the "worst". I using quite often for some very complex things. The only problem I find is that when designing they can be unstable. Sometimes I just have to delete the control and start fresh. Once compiled I rarely have problems.
However, it is an absolute pity that Access does not have a native Tree view and unbound grid control. In Vis Studio what you can do with an unbound grid control would solve so many user experience problems in Access.

Here is the Direct link to the JKP MSFORMS version. It is easier to distribute, and works pretty well. It does have its issues too.
 
Last edited:
I'm aware it was Active X. And I'm not asking where to find it. It was the very worst of what was wrong with Active X.
I was actually hoping for some modern alternative, and wondering they even exist.

I gather you have some kind of way to make a Tree. I would like to learn more about that, if you please.
Hi, there is a nifty custom treeview that I have been adapting for my programs. You may want to take a peek.

Best,
Jiri
 

Attachments

Yes, that is the JKP MSFORMS version as previously described.
 
Sorry, I try not to, But I guess I am not sure then what you are asking then. The way I read your response:

was that you did not have time to read the link and wanted me to spoon feed something to you. If you are looking for a way to build a native tree view using only Access controls I do not have a solution and no one does. You could do a poor fake using a listbox and indenting the levels, for something small.

That thread has very detailed explanations how I use a class module to make loading the tree view and working with it easy. It outlines about every feature you can apply to a treeview. Images, right click menus, drag and drop, returning manual sort orders, recursive calls, returning child nodes, expand and collapse code, dynamically loading....
It does not build it with native access controls if that is what you are asking. That does not exist anywhere and cannot be done.
I do demo in that thread how this can be done using MSFORMS which is "theoretically" more stable for distribution.
I do not find the treeview to be great and it has some quirks, but I would not say it is the "worst". I using quite often for some very complex things. The only problem I find is that when designing they can be unstable. Sometimes I just have to delete the control and start fresh. Once compiled I rarely have problems.
However, it is an absolute pity that Access does not have a native Tree view and unbound grid control. In Vis Studio what you can do with an unbound grid control would solve so many user experience problems in Access.

Here is the Direct link to the JKP MSFORMS version. It is easier to distribute, and works pretty well. It does have its issues too.
You are correct I have not read it. It will be part of my evening study. I probably misspoke when I said "if you please".
I meant thank you for posting that, and after I read it I will probably have some question, and thank you in advance for your clarification.
 
It turns out that all I needed for this Lookup filter was a single Table that has a Level Field and a Parent Field.

It was only going to need 5 levels, and maybe 6, but probably not.

Each of these entries can double as a foreign Lookup Record in the main table or as a Parent for other Lookup Records.

So I'm happy for now. Thanks for everyone input, I may revisit this.
1666304606594.png

1666304573716.png
 
Last edited:
If you want to post your table I will throw it in the treeview for demo purposes.
 
If you want to post your table I will throw it in the treeview for demo purposes.
Thank you,
That would be super cool.

The "-1" in pcbDependentLevelID Column denotes not used.
"0" in the pcbParentID Column indicates no Parent Record.
That might be obvious, but better more than less.
 

Attachments

Users who are viewing this thread

Back
Top Bottom