Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Tree View Control - Variable not defined

Posted on 2003-12-08
3
Medium Priority
?
1,505 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

688 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