I have MS access table which I want to view in Tree View in hierarchical levels from a table called “TesfaPersonal”. • I want to select all the AAs first and list them in TreeView (BY Tesfa_Name) in hierarchical level as per Tesf_level field indicated and then BBs in levels and so forth till all are listed in the treeview in a form. The DDs max level is 4.
On a new Form - drag the ActiveX-TreeView (6.0) into the form and call it "Treeview1"
Private Sub Form_Load()
Dim db As DAO.Database
Dim rs As DAO.Recordset
….
I had a hard time writing VBA codes for this. PLEASE HELP
The table is something like this
Tesfa_ID Tesfa_Type Tesfa_Level Tesfa_Name
1 AA 0 James
2 BB 0 Joe
3 CC 0 Jon
4 DD 0 Rahel
5 AA 1 Abebe
6 BB 1 kebede
7 CC 1 Kim
8 DD 1 James
9 AA 2 Abraham
10 BB 2 Mohammed
11 CC 2 Mary
12 DD 2 Martha
13 AA 3 Garrard
14 BB 3 Steven
15 CC 3 Chala
16 DD 3 Joe
17 DD 4 Kim
Regards
Tesfayesus
On a new Form - drag the ActiveX-TreeView (6.0) into the form and call it "Treeview1"
Private Sub Form_Load()
Dim db As DAO.Database
Dim rs As DAO.Recordset
….
I had a hard time writing VBA codes for this. PLEASE HELP
The table is something like this
Tesfa_ID Tesfa_Type Tesfa_Level Tesfa_Name
1 AA 0 James
2 BB 0 Joe
3 CC 0 Jon
4 DD 0 Rahel
5 AA 1 Abebe
6 BB 1 kebede
7 CC 1 Kim
8 DD 1 James
9 AA 2 Abraham
10 BB 2 Mohammed
11 CC 2 Mary
12 DD 2 Martha
13 AA 3 Garrard
14 BB 3 Steven
15 CC 3 Chala
16 DD 3 Joe
17 DD 4 Kim
Regards
Tesfayesus