Monday, February 11, 2008

Using a TreeView Control as a Record Selector

Treeview continues to be one of the most common of the search keywords that bring folk to MyMSAccessBlog. I love developing with treeviews and if I can narrow down the specific questions folk are searching for answers to I'll post some detailed tips or solutions. For now, here's here's a zip file from Helen Feddema's Access Archon page with a working example:

The example uses a treeview to select books or authors to display information about.
Quote:
A TreeView control makes a better record selector than the standard combo box for situations where you are working with hierarchical data, and want to allow selection of an item from a branch of the data hierarchy.

For all my treeview posts click here.

7 comments:

Helen Feddema said...

The Reader's Companion database has been considerably updated since the time of that example. It's fine as an example of using a TreeView control as a record selector, but it doesn't allow for duplicate titles (by different authors), a problem which I have since fixed. I plan on posting an updated version of this database to my Web site soon.

Stephen said...

Thanks for that news, Helen! I'll update the link here if you let me know when the new version is posted.

Helen Feddema said...

I have updated the code sample (now the Reader's Companion database). It stores data about ebooks, printed books and audio books, and the Copy Record button on the main form demonstrates use of the Controls collection of a form and the Tag property of form controls to fill an array with data from the current record, for use in creating a new record with mostly the same data.

The code sample can be downloaded from this link: http://www.helenfeddema.com/Files/code42.zip

Stephen said...

Thanks! The new version looks great! I like the standardized copy record function.
I've added the new link to my post.

Ordis said...

The Reader's Companion database has been considerably updated since the time of that example

RomainR said...

You're tuto is just awesome. Thanks a lot !

ron said...

Thanks for this great example.
I would like to display attributes of the parent record when I click a parent node. Is that possible?