Solved

Tree View Control - Variable not defined

Posted on 2003-12-08
3
1,482 Views
Last Modified: 2012-06-21
I have the following line of code on the On_Load of a form containg a treeView Control

Set nodMRUExplorer = tvwMRUExplorer.Nodes.Add(strRelative, tvwChild, strFolderKey, rst.Fields(t + 2), "Folder")

This has been working fine for a year or two. I have been making some changes to the database and am now getting a 'Variable not defined' error on 'tvwChild'.

As far as I can tell this has never been defined elsewhere in the code. I have checked that the reference to 'Tree Control 1.0 Type Library' exists. I think the main thing that I have changed is that I have re-defined the list of top level folders. I have also added a reference to ADO 2.7 where it used to only use DAO 3.6, so it now uses both in the same procedure.

I know this is maybe a bit vague, but hopefully someone might be able to spread some light.

thanks

Daniel
0
Comment
Question by:regodab
  • 2
3 Comments
 
LVL 23

Expert Comment

by:heer2351
ID: 9900373
What you need is a reference to:

Microsoft Windows Common Controls

This contains the treeview control and the tvwChild constant.
0
 
LVL 4

Expert Comment

by:dasari
ID: 9900379
wat's u'r access version.....
0
 
LVL 23

Accepted Solution

by:
heer2351 earned 500 total points
ID: 9900403
BTW if you can not find it in the reference you have to browse to it:

c:\windows\system32\mscomctl.ocx               (usually)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now