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

x
?
Solved

No Node-Click Event for MS TreeView control V6.0?

Posted on 2010-09-02
21
Medium Priority
?
1,714 Views
Last Modified: 2013-11-28
In MS Excel this control has a handy Node-Click event, but I can't seem to find this event in the Access version. Does it exist?
0
Comment
Question by:Milewskp
  • 11
  • 5
  • 3
  • +1
21 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 33588579
I think you'll find there is one (and lots more events as well). It's the properties box that is the problem, not showing most of them.

In the vba code window you can select the nodeclick event from the dropdown list at the top of the code panel.
0
 
LVL 1

Author Comment

by:Milewskp
ID: 33588785
Hi Peter,
I tried that already but only the events on the properties sheet appear in the dropdown list at the top of the code panel. Then I tried it just now on another computer, and it shows many more properties (including Node-Click). What would account for the difference?
0
 
LVL 77

Expert Comment

by:peter57r
ID: 33588845
32 bit office vs 64 bit office?

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:Milewskp
ID: 33589172
Hi Peter,
Both are 32 bit I believe, but it turns out one machine is running Access 2003 SP2 and the other has Access 2003 SP3. Could this account for the difference?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33589400
which one is showing less options,  Access 2003 SP3?
0
 
LVL 1

Author Comment

by:Milewskp
ID: 33589445
Access 2003 SP2 is showing fewer events.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 800 total points
ID: 33589638
you may need to repair the Access or reinstall.
to repair, have the Office 2003 available
from Access window
Help > Detect and Repair
0
 
LVL 1

Author Comment

by:Milewskp
ID: 33590795
Tried Detect and Repair, no change.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33591194
uninstall Office 2003 from control panel > add/remove program
reboot pc
install Office 2003 with options of run everything in computer
0
 
LVL 1

Author Comment

by:Milewskp
ID: 33591530
Hi cap,
This issue isn't important enough to warrant a reinstall on a PC that otherwise seems to be working OK.

It is correct to assume that if I install Office 2003 from the same CD to 2 different PCs, that I will have the same TreeView control events on both, or does it also depend on how office is configured or what references, extensions are used/ installed? That's probably all I need to know.
0
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1200 total points
ID: 33602690
In the majority of cases, the Treeview control is not part of Office, but is rather a VB control. Installing or reinstalling Office (or any part) won't have any effect on these controls, and your currently installed version of Office won't really have any effect on that control. I'd be willing to bet that if you examine the acutal file for the Treeview control, you'll find different versions.

Access 2003 was the last version of access to actually provide and support a treeview control (and then only in the Developer's Edition, which was a separate purchase from all other versions). Many people use the standard VB Treeview, and it definitely exposes a NodeClick event:

http://msdn.microsoft.com/en-us/library/aa443492(VS.60).aspx
0
 
LVL 1

Author Comment

by:Milewskp
ID: 33605221
Thanks LSM,
In the link it says:
<To use the TreeView control in your application, you must add the MSCOMCTL.OCX file to the project>
How do you add a file to a project?
0
 
LVL 85
ID: 33606016
An .ocx control is an ActiveX control. You insert that using the standard Insert method (i,e, you don't just add a Reference, you add the control to your form, and Access manages the reference for you). And don't forget - while the Treeview is a pretty well behaved control, it is not certified for use in the Access environment, and therefore you may have troubles on different machines.
0
 
LVL 1

Author Comment

by:Milewskp
ID: 33612493
Hi LSM,
I'm still not clear. Do you mean that all you have to do is copy the MSCOMCTL.OCX file to the user's Microsoft Windows System or System32 directory, and then the treeveiw control will appear in the toolbox's list of ActiveX controls?
0
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1200 total points
ID: 33614054
No, you should not do that. OCX files are dependant on several other files, and must have the correct dependant files installed in order for them to run correctly. If you need to install that control on another machine you'll have to do so using standard installation methods. If this is something that is needed for development, then you'll have to install an environment that includes those controls (like VB 6.0, for example) - that's the only way you can get them (and VB 6.0 isn't available any longer).

If you just need "runtime" versions of those controls (i.e. the enduser won't be using them in a design environment) then you can often just use the redistribution installations of those controls. Whether you can legally do so is dependant on what development products you own (Access doesn't provide you distribution rights). There may be downloads available depending on exactly which file is needed.
0
 
LVL 1

Author Comment

by:Milewskp
ID: 33617016
Thanks LSM.
0
 
LVL 1

Author Closing Comment

by:Milewskp
ID: 33617035
Thanks all.
0
 
LVL 85
ID: 33618285
Just curious - did the repair of Access/Office actually resolve this? I can't imagine it did, since you're issue was with an ActiveX control not involved with Access, but perhaps there was something in the Access install that was bad, and wouldn't show you the proper values?
0
 
LVL 1

Author Comment

by:Milewskp
ID: 33618566
<Tried Detect and Repair, no change.>
0
 
LVL 85
ID: 33618655
Then again I'm curious: Why accept that comment as an answer? I have no issue with it if you feel the comment was important to the question, but the two accepted answers are vastly different (and neither may acutally be correct).
0
 
LVL 1

Author Comment

by:Milewskp
ID: 33619043
Hi LSM,
Good question. I give points to posts that answer the quesiton or add value.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

963 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