In this presentation, Pete Poppe introduced the Treeview control and demonstrated when it can greatly benefit the display of certain types of data within Access applications. In particular, treeviews provide a means of showing hierarchical data in a compact but expandable form. Access does not have a native Treeview control but there are Active X and third-party versions. The presentation included advice on using treeviews and provided a “wrapper” class that makes working with treeviews much simpler.
Download:
Demo database with wrapper class and presentation from: https://isladogs.co.uk/aeu-30
Times:
00:00:00 Welcome from Colin Riddington
00:00:45 Intro by Pete Poppe
00:00:58 Background
00:04:20 Objectives
00:05:04 Agenda
00:05:58 What is a treeview control?
00:06:33 Two types of data - hierarchical & organized
00:07:18 3 custom Access database examples
00:08:22 Terminology
00:09:40 Two free treeview controls - ActiveX/JKP
00:12:27 Access UI Ribbon & Tree Builder
00:12:49 MajP Beta Fake Listbox Treeview
00:13:36 How to use Active X control
00:14:02 How to use JKP control
00:14:13 Need/Utility
00:15:53 Visualize Data & Relationships
00:16:47 ... as Navigation / Combo / List Control
00:17:08 DEMO - Add or edit hierarchical data in treeview - expand/collapse tree or branch; run checks etc
00:18:30 DEMO - Node information - check level/key/index/descendants etc
00:19:26 Large Datasets with more than about 2000 nodes can cause stability issues - only load visible records
00:20:54 DEMO - E2E showing full treeview capabilities - move/renumber/add/remove nodes
00:24:27 DEMO - BOM Tree
00:25:29 Self Referencing Tables
00:26:34 Self Referencing Tables can enforce Referential Integrity
00:27:28 Recursion
00:30:30 Load a tree using Recursion
00:31:31 Trying a treeview to the data
00:33:42 Common Query - allows resusable code
00:34:35 Self referencing example
00:36:57 Organized data example
00:37:38 Tips/tricks
00:38:58 Key Treeview Methods
00:40:44 Treeview form - Wrapper class
00:41:12 Initialize Event
00:42:30 Key Methods from Wrapper Class
00:42:39 Image List - used to show icons - also part of Common Controls library
00:43:33 DEMO - Build Tree from scratch using wrapper class
00:46:42 To edit the treeview control properties, right click on the control and select TreeCtrl Object | Properties . . . OR double click with the treeview control NOT selected
00:47:05 Form VBA code to manage the control properties
00:50:20 Questions: Q1: Eric B - can a split form could be used to combine treeview & listview. No - but possible with a simulated split form
00:51:08 Q2: John B - can a treeview be printed? Can simulate it using report sorting and grouping
00:51:44 Q3: Ken W - wrapper class is excellent - is it in the demo database? YES
00:52:22 Q4: Ken W- An old Windows update caused ActiveX controls to fail - has this been an issue recently? No. Much more stable nowadays.
00:53:34 Discussion: Alessandro G - AG - shouldn't be necessary to register the MSCOMCTL.OCX library file to use the treeview control. Pete disagreed. Is this version dependant?
00:54:35 AG - recommended using recursion to save a lot of code when using treeviews
00:55:18 AG - compared treeview container vs treeview object
00:56:03 Paul S - queried missing PersonID for BossID in slide 28. Does the treeview handle that? Yes - provided Referential Integrity is enforced
00:57:47 Eric B - suggested a 'root record' to prevent issues in the case of an 'absent parent'. Not an issue provided R.I. enforced or mark as unassigned.
01:01:21 Q5: Crystal - is there a character limit for each node? Not but excessively long text might be difficult to read
01:02:11 Bernd B - another treeview control by Thomas Pfoch - https://www.picoware.de/info/treeview...
01:02:37 Many thanks to Pete for an excellent presentation. Links for downloads
01:03:18 Next month: Aleksander Wojtasz - Advanced Techniques with Interactive Gantt Charts - see https://isladogs.co.uk/aeu-31
01:06:37 Final comments. Thanks to our presenter and all those attending. Next meeting - Wed 4 Sept
01:07:42 End