Solved

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

Posted on 2010-09-02
21
1,521 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

19 Experts available now in Live!

Get 1:1 Help Now