programmatically selecting a branch in a treeview

S

Sjef

Hello,
I have atreeview control in one of my Access forms which shows the structure
of records from a table. I would like to programmatically select a branch at
the highest level when refreshing the treeview. Is this possible, I don't see
any methods to do so...
Thanks ia
Sjef
 
R

Ron Weiner

Sjef

It is pretty straight forward to programmatically select a node in the tree.

tvw.Nodes(1).Selected = True
tvw.Nodes(1).EnsureVisible

The snip of code above does the following

Selects the first node of the tree
Makes sure this node is visible in the treeview window

Ron W
www.WorksRite.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