Solved Treeview automomaticly filled from an Access table, without code ? (1 Viewer)

Alain CHAZOT

New member
Local time
Today, 05:42
Joined
Mar 7, 2021
Messages
14
Hello,

I guess the question has been asked multiple times.
Sorry to ask it once again, but what I found didn't quite meet my request.

I have an Access table called "Category" with the following fields:

  • N_Category: auto num - identifier of the category (unique key) - long int
  • Category: category name - string
  • ParentCategory: contains the N_Category ID of the parent category

Is there a TreeView type hierarchical list control that can be filled in automatically (i.e. without code) by indicating the source table (like a form or a drop-down list to which a table is linked in the "Source property ")?

I couldn't find the source property in the OCX Treeview 6 that came with Access 2016.

If that doesn't exist, I'll write the necessary VBA code, but the first solution would be better ;-)

Thank you !

Alain
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 11:42
Joined
May 7, 2009
Messages
19,238
you'll need to write it.
don't worry there are many example on the net.
 

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 23:42
Joined
May 21, 2018
Messages
8,527
Good luck. But seriously, if you can make that simple query and alias all the fields correctly you should be able to load that tree in a single line of code. I should have just mentioned to go to the front of that thread, because after my first post that thread blew up. Simply how to load the tree based on the class was in the first thread. The final solution of that thread was a super powerful treeview with just about every bell and whistle you could ask for.
 

Alain CHAZOT

New member
Local time
Today, 05:42
Joined
Mar 7, 2021
Messages
14
Hi MajP,

I took a look at the code and it's very usefull for me.

Once again, thanks a lot, that's perfect ;-)

Alain
 

Users who are viewing this thread

Top Bottom