Drew Wutka
DWUTKA at Marlow.com
Wed Oct 7 09:52:23 CDT 2009
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 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, October 06, 2009 4:26 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Drew, Hi, I tried to position as you describe below and I am getting error 438 (object doesn't support property or method) This is what I am using to position Top, Middle, bottom Where top is Lv1:1 Middle is Lv2:1 Bottom is Lv3:1 Any clues? TreeView1.Nodes ("Lv1:1:Lv2:1:Lv3:1") Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 06 October 2009 17:03 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview This would be something you need to do based on the Key values. So let's say you have a simple treeview based on one table that has an 'ID' field. When you create the node, set the key to "ID:" & rs.fields("IDField").value Then to retrieve the node: tvwData.Nodes("ID:" & rs.fields("IDField").value) for more complex treeviews, with multiple sources, it's just a matter of extending the process. For example, I have a 'request' treeview, which will show user requests (tblRequests), along with Interim Reports, Final Reports, 'Punts', Purchase Requests, etc. All from different tables. Each of those other tables have a unique key, BUT, the keys COULD be the same from a request and an interim report(or any other sub 'object'). So, my requestNodes would be: "ID:1", "ID:2006", etc. My Interim Report nodes would be: "ID:1:INTRM:12" (so this key tells me it's request 1, with Interim 12). This way, when I ask for "ID:1", I get the request node. If I ask for "ID:1:INTRM:12" I get the interim node, and I never have a clash of IDs. I can also tell what the node represents from the key this way too. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Monday, October 05, 2009 12:08 PM To: Access Developers discussion and problem solving Subject: [AccessD] Select a node in a treeview Good Afternoon, Can anyone tell me how to select a node in a treeview? I want to select it based on a the value of the current record (not that it probably matters) :) thanks! Dale -- 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. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://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.