Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ActiveX Tree Control

Posted on 1998-08-15
3
277 Views
Last Modified: 2006-11-17
I'm trying to get data from several queries onto one display, and would like to present all of the data on a tree control. Right now, I can't even figure out how to populate the tree, and online help has not been of any assistance. I'm left with what seems to be a big, blank, textbox. Can anyone please give me a little help, or give me a url of a place that can be of some assistance? Thank you.
0
Comment
Question by:behrang
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
tuvi earned 100 total points
ID: 1959290
You use the control's Nodes property which is itself a Nodes collection. The Nodes collection have the Add method to add object to it. Refer to online help for the syntax.
0
 

Author Comment

by:behrang
ID: 1959291
The only help of syntax that I found where .root, .parent, etc. Am I on the right track?
0
 
LVL 5

Expert Comment

by:tuvi
ID: 1959292
I know it is tough to get into the right help topic involving ActiveX control (blame it on Microsoft). Anyway, this is how I get to the right topic:

Put your cursor on the Style property of the Treeview control. Press F1. The Help on Style Property will display on screen. Now click on Applies To and choose Node Object / Nodes Collection. You now have the help on the Nodes Collection. Click on Methods and choose Add Method (Nodes Collection). And there you have the right help on the Add syntax.

Here is my example of how you use the Add method to your control. I name the TreeView control as "ctTree".

Private Sub Form_Load()
  Dim colNodes As Nodes
  Dim curNode As Node
 
  Set colNodes = ctTree.Nodes
  colNodes.Add , tvwFirst, "Root", "The Root"
  colNodes.Add "Root", tvwChild, "FirstRootChild", "First Level / First Item"
  colNodes.Add "Root", tvwChild, "SecondRootChild", "First Level / Second Item"
  colNodes.Add "FirstRootChild", tvwChild, "FirstRootChild-1", "Second Level"
End Sub
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sum in Split Form 17 28
set focus to tabbed sub form 10 39
default combobox value 12 18
How to define combination of fields as a non duplicate combination. 3 16
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question