Solved

Tree View Control - Variable not defined

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

21 Experts available now in Live!

Get 1:1 Help Now