Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Tree View Control - Variable not defined

Posted on 2003-12-08
3
Medium Priority
?
1,511 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

773 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