473,902 Members | 3,407 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

No treeview reference

Seth Schrock
2,965 Recognized Expert Specialist
I'm trying to use an ActiveX treeview control. I was trying to declare it in VBA and discovered that there was no option for declaring a variable as MsComctlLib.Tre eView. I'm assuming that this is a reference problem, but I can't find a reference that specifically says for the treeview and I can't find online what reference it requires. I also checked, and I don't have the MsComctlLib file on my computer which I would assume that I would need. Where can I get it and how do I add it to the references list?
Dec 24 '12 #1
10 24291
5,501 Recognized Expert Moderator Expert
Just because I'm dense.... you tried (now I'm speaking in version 2010 which is OFFICE14 on the hard-drive install:
Form in design mode.
Insert activex control
Microsoft Treview Control, Version 6.0

this either was not available or did not work?

Open VBA editor:
[X] Microsoft Office 14 Object Library
[X] Microsoft ActiveX Dataobjects 2.1 Library

You need "mscomctl.o cx" if I remember correctly. IN a WinXP install it is in the "windows\system 32"

OK - I'm pushing 20 hours up time and I need to be back up and out within the next 5 hours so time for a nap

Merry Christmas to those who are in the 25th and Happy Christmas Eve that are in the same boat with me!

A sip of EggfNoggg..,..! !!!, !!!!! zzzzzzzzz
Dec 24 '12 #2
32,584 Recognized Expert Moderator MVP
Does Smiley's article not explain how to get hold of the library Seth?

I use Win XP still and the file is found on my system as :
C:\WINDOWS\syst em32\mscomctl.o cx

If you don't have this available then you need to get hold of and install it before trying to access it ;-)
Dec 24 '12 #3
Seth Schrock
2,965 Recognized Expert Specialist
@Z I'm using Access 2010 as well. Inserting the control worked just fine. My problem came in the VBA editor when trying to declare a variable as a treeview as Smiley had in his video
Expand|Select|Wrap|Line Numbers
  1. Dim tv As MsComctlLib.TreeView
I assumed that this meant that I needed the MsComctlLib file. I already had the reference to the Microsoft Office 14 Object Library selected, but not the Microsoft ActiveX Dataobjects 2.1 Library. However, adding that later didn't fix it.

I GOT IT! I found an article that said that Windows 7 x64 (what I have) stores its 32 bit drivers in the Windows\SysWOW6 4 folder (my office installation is 32 bit). In the References window, I browsed to that location, selected the MsComctl.ocx file which turns into the Microsoft Windows Common Controls 6.0 (SP6) reference. I selected it and it now works.

@ NeoPa No Smiley doesn't tell how to get a hold of the library. I might add a comment to his YouTube video and suggest explaining that.

One more question that might be a little off subject, but does anyone know how to add this reference when the user only has Microsoft Access Run-time 2010?
Dec 24 '12 #4
32,584 Recognized Expert Moderator MVP
You add it into the database as a developer Seth, so that it's already there when the user opens it.
Dec 24 '12 #5
Seth Schrock
2,965 Recognized Expert Specialist
Great! I don't have to worry about that then. Thanks NeoPa for that information and to everyone who posted trying to help me out. It is very much appreciated.
Dec 25 '12 #6
32,584 Recognized Expert Moderator MVP
Great! I don't have to worry about that then.
Absolutely not :-)

Time to relax and join Z in an egg-nogg I think. Merry Christmas to all!
Dec 25 '12 #7
2,322 Recognized Expert Moderator Top Contributor
Merry christmas to you all.

Usually when you design your form (as shown in the video) and insert the treeview active X control, my experience has always been that Access will automatically set the reference to the Microsoft Common Control Library (mscomctllib). See the video @ Treeview video @ time of Active X insertion

Did your approach not follow the path outlined above?
Dec 25 '12 #8
Seth Schrock
2,965 Recognized Expert Specialist
That is the way that I did it and the reference didn't come up until I manually added it. I'm not sure why it didn't. I was following along with your video and when I got to the loadTreeview function the first dim statement didn't work. Another anomaly that I have found is that the tree view object's properties (not the control properties) won't let me change the properties. I have had to make the changes (like the indent space) in VBA. Could this be for the same reason that the VBA reference didn't get made automatically?
Dec 25 '12 #9
2,322 Recognized Expert Moderator Top Contributor
Hi Seth
I believe it may be related to a issue in which Microsoft released a update to the MScomCtlLib which was incorrectly patched by microsoft, causing registry errors.

I believe if you follow the advice laid out in:
Your results should more closely match my video. If you do follow the advice, please let me know, so that I know to create a addendum of sorts to my treeview vid.
Dec 25 '12 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520" AutoPostBackOnNodeMove="false" DragAndDropEnabled="true" NodeEditingEnabled="False" KeyboardEnabled="true" CssClass="TreeView" NodeCssClass="TreeNode" SelectedNodeCssClass="SelectedTreeNode" HoverNodeCssClass="HoverTreeNode" NodeEditCssClass="NodeEdit"
by: Access User | last post by:
I'm looking for complete documentation for the activex component "TreeView" in Access. I need a complete list of methods and properties, if such a thing exists. Paul
by: Jeroen Ceuppens | last post by:
Hi, I want to make something that adds a TreeNode to the end of TreeView, that TreeView Looks like + Level 1 + Level 2 + Level 3 - Level last
by: Ian Powell | last post by:
Hi I've got objects in an sorted ArrayList like: P:\ P:\\DOCS P:\\i386 P:\\i386\ASMS P:\\i386\ASMS\1000 P:\\i386\ASMS\1000\MSFT
by: Trond Hoiberg | last post by:
Let say i have a bunch of files. Logfiles that is stored in subfolders. Folder1 --logfile1 --logfile2 --logfile3 Folder2 --logfile1 --logfile2 I want to display these files using data from the files in an TreeView
by: dillon_99 | last post by:
Hello, I have been working with the treeview control from Microsoft. Here is what I want to do: I have a function that returns a string: private string generateNodeString(ArrayList array) { string ReturnVar = "myTreeview.Nodes";
by: juvi | last post by:
Hi, I have got a problem with Treeview.Nodes.Clear() under VB2005. When I have some nodes in my treeview and a force to clear() all nodes then it seems to work, because the nodes are not visible. But when I add new nodes and I want to look for a specific item then I only get the Items from the beginning --> something is not working with the clear() method. Please help me!?! juvi
by: Simon Rigby | last post by:
Hi folks, A bizarre problem I am having. I have a treeview which is bound to an XmlDataSource. The XMLDataSource.Data property is set to the result of a function that generates an XML document from a SQL Query. The problem is that the Treeview renders correctly and expands with the appropriate hierarchy but clicking anything but the very top node gives me a NULL Reference Exception. I haven't even got to the stage of doing anything...
by: casManG | last post by:
I am working on a small project that uses the treeview control in .net 2003. I have a tree view that I am sending to a sub in order to iterate through the nodes. Public Sub test (ByVal inTreeView as Tree View) But, the thing I want to do with the inTreeView requires me to expand all the nodes before I iterate. The problem is that when the sub is complete, the original tree view on my form ends up with all of the nodes expanded I had...
by: metalheadstorm | last post by:
hi i have a strange problem with my treeview i currently have in my pogram (in vb6) a week ago i placed a treeview on my form and did all the code for it etc and got it to work fine, i even made an .exe and sent it to a friend so he could have a look @ how my program was coming along and that worked fine (and still does on mine and his) now (last night) i tried to run my program and i got a user-defined error on the line (in bold) ...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.