Solved

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

Posted on 2010-09-02
21
1,531 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
 
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 119

Expert Comment

by:Rey Obrero
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 119

Accepted Solution

by:
Rey Obrero earned 200 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 119

Expert Comment

by:Rey Obrero
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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 300 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 84
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 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 300 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 84
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 84
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
View vs Edit mode enhancements 12 40
Listbox not remembering select items when come back to the record 5 28
Access Runtime 2010 Error 17 30
ms access 2013, running .mdb 2 30
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…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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…

920 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

12 Experts available now in Live!

Get 1:1 Help Now