Selections in TreeView

G

Guest

Hello,
I have setup a treeview control with just one level, as follows:
Trvw.Nodes.Add , , "Root0", "Parties-Appellant"
Trvw.Nodes.Add , , "Root1", "Parties-Respondent"
Trvw.Nodes.Add , , "Root2", "Citation"
Trvw.Nodes.Add , , "Root3", "Date"

I would like to also set up a case statement where if the user chooses
"Parties-Appellant", one subform which will actually be a search screen will
come up, if "Parties-Respondent", another subform to search on, etc..
however I'm not sure what value to pass to the case statement to test what
value they have chosen. I tried the node.index value which doesn't seem to
work. Any suggestions would be greatly appreciated. I'm new to the treeview
control.
 
G

Guest

thank you. I'm sorry but I don't understand how that could test using a Case
statement.
 
G

Guest

Thank you so much for your patience with me. I'm still very new to VBA and
I'm in a little bit over my head here. The select case statement didn't work
because I don't think I'm passing the right kind of value to the routine
that's doing the case evaluation. I have this treeview control which I
initialized as
Private WithEvents Trvw As MSComctlLib.TreeView (using some code I found on
the internet)

Then, I set up my tree structure names as I indicated in my previous email.
Then, on the click event for the treeview control I have the following

Private Sub Trvw_NodeClick(ByVal Node As MSComctlLib.Node)

So by clicking I'm passing a an MSComctlLib node into the function, which I
don't really understand and the Help screen in Access doesn't really describe
exactly what a node is. The value of the node is not the captions "Parties
appellant", "parties respondentt", so I guess I need to assign a value to
each of these captions but I'm sorry I just don't know how to do this.

Thank you so much for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top