Solved

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

Posted on 2010-09-02
21
1,626 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
[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
  • 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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 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 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 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 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 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 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

617 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