Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 15th, 2003, 10:09 AM
Authorized User
 
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default ActiveX Treeview Control in Access Form

I'm trying to populate the nodes of a treeview in
an Access 2000 form. However, when I refer to the
control in VBA (i.e. Me.ActiveXCtl1.) the NODE property
doesn't appear. I can do this in VB6 but why doesn't
it appear in VBA?

CEJ
__________________
CEJ
 
Old July 16th, 2003, 03:46 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

There is a problem with the interaction between Access and the Treeview control.

It does work, and all the properties, methods, etc. are available - but unfortunately the Intellisense bit doesn't work and you have to type it by hand.

Just like the bad old days...




Brian Skelton
Braxis Computer Services Ltd.
 
Old March 25th, 2005, 09:33 AM
Registered User
 
Join Date: Mar 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi.
Just a dumb question.
How do you enter the nodes by hand?

Thanks
Robert

 
Old March 25th, 2005, 10:09 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 248
Thanks: 0
Thanked 1 Time in 1 Post
Default

I think Brian is using the term "nodes" to mean Properties, Methods and Events.

So, while Intellisense will take over when you type

docmd.

in your code and show you all of the properties, methods and events available for DoCmd, when you're working with a Treeview control, you have to know what to type after the dot.

Tip: An easy way to find out what properties, methods and events are exposed is to open the "Object Browser" in the VB editor.

Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org
 
Old March 25th, 2005, 10:15 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 248
Thanks: 0
Thanked 1 Time in 1 Post
Default

BTW, when I say "exposed" I'm referring to the fact that, by default, the object browser doesn't display "hidden members". To display hidden members, right click in the list of properties, methods and events and select "Show Hidden Members". As if you didn't have enough classes, properties, methods and events to figure out how to use!!! Sheeze!

Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org
 
Old January 12th, 2008, 08:15 PM
Registered User
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Intellisense always works if you declare the tree and nodes first then set the objects.

Dim objTVW As TreeView, objNode As Node

Set objTVW = Me!TreeviewNameHere.Object

Set objNode = objTVW.Nodes.Add([Relative], [Relationship], [Key], Text, [Image], [Selectedimage])
Node syntax shows [bracketed] properties as optional.

Paul

 
Old January 12th, 2008, 08:17 PM
Registered User
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Forgot to mention don't forget to destroy all objects at the end.

Set objNode = Nothing
Set objTVW = Nothing

 
Old March 18th, 2008, 02:40 PM
Registered User
 
Join Date: Mar 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you run events off of the children nodes (i.e double-click event)in the tree control.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Populating TreeView Control using Access Database dotnetDeveloper ADO.NET 0 November 18th, 2008 12:58 PM
Treeview Control cymerman ASP.NET 1.0 and 1.1 Basics 0 March 26th, 2008 08:57 AM
custom activex control in access ParadiseIsle Access VBA 0 November 2nd, 2005 08:00 PM
Implementing ActiveX Control on Access Form JimmyNeutron Access VBA 2 November 2nd, 2005 01:33 AM
Trying to Place ActiveX Calendar Control on Form twsinc Access VBA 3 October 29th, 2004 07:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.