Solved

Tree View Control - Variable not defined

Posted on 2003-12-08
3
1,485 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

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…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

809 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