TreeView level information

M

Makelei

Hi,
In my treeView there is max 3 level of data. I have used checkboxes to let
users select the ones they need. They have a possibility to check 3rd level
checkbox and it will automatially select all 4th level nodes. Same with 1st
level when checked it will automatically check all nodes below within that
branch.

Now the problem: I need only data from the 3rd level - I am able to get
nodes information from all levels that has been checked, but Houw could I
limt data to only 3rd level?

I am using Access 2003 with XP.

BR
MakeLei
 
A

Alex Dybenko

Hi,
to get a node level you can make function with following code:

Set nNode = oTV.SelectedItem
If nNode.Root.Key = nNode.Key Then
strLevel = "0"
ElseIf nNode.Root.Key = nNode.Parent.Key Then
strLevel = "1"
ElseIf nNode.Root.Key = nNode.Parent.Parent.Key Then
strLevel = "2"
End If

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 

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