Drew Wutka
DWUTKA at Marlow.com
Wed Oct 7 14:42:24 CDT 2009
Don't use full path, use 'key'.
Drew
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
Sent: Wednesday, October 07, 2009 12:41 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Select a node in a treeview
Slowly making progress.
I have now built the tree ok but when I try to position back on a node I
get
an error.
This first bit is ok.
Dim tvw As TreeView, nod As Node, strNod As String
Set tvw = Me.TreeView1.Object
Set nod = tvw.Nodes("Lv3:1") ' hard code the key
nod.Selected = True ' select it
as does this bit.
strNod = nod.FullPath ' get the name (path) of the selected node.
Debug.Print strNod ' works fine
MsgBox strNod ' works fine
'the above works just fine but when I try to reverse it I get an
error
35601Element not found
Try to position on a key using the key's value
Set nod = tvw.Nodes(strNod)
nod.Selected = True
ERROR
I am looking for some way to get it to position on a key from
the
key's value.
Any help appreciated.
Max
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka
Sent: 07 October 2009 15:52
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Select a node in a treeview
Treeview.Nodes("SomeKey") value is going to return a single node that
matches the key. Also, in Access (Sorry, forgot this part), you need to
use
the treeview's object:
Dim tvw As TreeView
Set tvw = Me.tvwSkills.Object
Drew
/www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the person or entity
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business
Sensitive material. If you are not the intended recipient, please contact the sender
immediately and destroy the material in its entirety, whether electronic or hard copy.
You are notified that any review, retransmission, copying, disclosure, dissemination,
or other use of, or taking of any action in reliance upon this information by persons
or entities other than the intended recipient is prohibited.