Treeview node focused (1 Viewer)

danit58

Registered User.
Local time
Today, 13:05
Joined
Aug 16, 2005
Messages
24
I need to open a form which contain a treeview control; I want setfocus to a specific node selected by passed parameter, and expanded this selected node
Any One With An Idea...will be highly appreciated.
(Access 2003)

By danit58
__________________
 

GaryPanic

Smoke me a Kipper,Skipper
Local time
Today, 05:05
Joined
Nov 8, 2005
Messages
3,294
I saw something on this in the sample d/base section (very near the end) - hope this help (I've no idea)
 

danit58

Registered User.
Local time
Today, 13:05
Joined
Aug 16, 2005
Messages
24
Where is the sample????
 

Bat17

Registered User.
Local time
Today, 13:05
Joined
Sep 24, 2004
Messages
1,687
an idea :)
Code:
Private Sub Command5_Click()
Dim nodX As Object
      For Each nodX In treeview1.Nodes
         If nodX.Key = "xyz" then
          nodX.Expanded = True
         end if          
      Next
End Sub

Not sure if you will get away with it this easy or if you will have to step through expanding all the branches though.

Peter
 

Users who are viewing this thread

Top Bottom