By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

MS Access Treeview error loading ActiveX control

P: 7
recently an error appeared with a Treeview element in my access form.

The expression Expand you entered as the event property setting produced the following error: There was an error laoding an ActiveX control on one of your forms or reports.

When I click "OK" (only opportunity) the next error appears (Expand is replaced by MouseMove, MouseDown/Up, DblClick etc.), when I press Keys the KeyDown/Up/Press Message appears etc. When I interact with the TreeView then the "Expand" is replaced by e.g. NodeClick or Collapse. Every message only appears once, when I performed every possible Event no message pops up - but the treeview doesnt work, it doesnt open any form (the treeview is used as a menu).

The mysterious thing to me is - last week those Access Databases all worked fine - we have a database for every customer (frontend and data together) and now suddenly every database 'crashes'. I assumed that the ActiveX Treeview Control was changed by a Windows Update or something similar but also an old WinXP laptop throws the same error messages. Even a database that hasnt been opened for 2 weeks and definitely worked back then doesnt work anymore. So from my point of view there cant be anything in the code that is wrong.

Nevertheless I tried to set a breakpoint in the Form_Load event, but the Expand Error already pops up before the first line of OnLoad is executed. The OnLoad Event is the only event that is specified (GUI says "Event Procedure", its VBA Code only) and all other fields are blank (and no code specified). I created a blank VBA for e.g. MouseMove, but the error still appears.

What is this error and where does it come from? Hope anyone can help.

Regards,

Matthias
Aug 20 '12 #1
Share this Question
Share on Google+
6 Replies


P: 7
My Treeview Project 5

via this URL there is a sort of "tutorial" where someone makes use of the treeview in access.
When I download his files the same errors appear. So I think it definitely has to do with the Treeview-ActiveX controls.
Do the files work at your computer? If so, why so?
Hopefully someone has an idea..
Aug 20 '12 #2

zmbd
Expert Mod 5K+
P: 5,287
The one form I've played with seems OK; however, I haven't used this control much.... I did however, find a file here: http://www.psci.net/gramelsp/TreeviewSample.zip that when unpacked worked just fine with my local installs.

It may be that the updates haven't cycled thru our systems yet (typically over the weekends when they hit) so if this changes on Monday or later this week, I'll post back.

-z
Aug 20 '12 #3

TheSmileyCoder
Expert Mod 100+
P: 2,321
If it is only affecting your computer I would try a re-install.

If it was only affecting a single form/datebase my guess would be that the database had become corrupt and you could try decompiling it and then a Compact+Repair and a recompile.
Aug 22 '12 #4

TheSmileyCoder
Expert Mod 100+
P: 2,321
I just stumpled accross this in the Professional Microsoft Access Developers' Network (PMADN)


Luke Chung
• We just published a detailed paper describing this issue, some of the symptoms, and how to address it entitled:

Fixing the Microsoft Windows Common Control Library (MSCOMCTL.OCX) Security Update
http://www.fmsinc.com/MicrosoftAcces...mctl/index.htm

It details how the suggestion in the KB article (http://support.microsoft.com/KB/2687441) fails, and a workaround that involves:

•Installing an older version of the control
•Registering it
•Unregistering it, and
•Re-registering the updated one

What a hassle. Hope this helps

I haven't tested his solution, since I don't (yet) have a problem with the treeview, but Luke and his firm does alot of good work, so I would suggest checking it out.
Aug 23 '12 #5

P: 1
@TheSmileyCoder
I've just tested this out. I just did the unregister and register of the new mscomctl.ocx and it worked!! Have been tearing my hair out over this for a couple of days, so many thanks for posting this!!! Very relieved and grateful :)
Aug 23 '12 #6

TheSmileyCoder
Expert Mod 100+
P: 2,321
I can only imagine the frustration you must have felt. I think 95% of my applications would not be usuable without the treeview, I use them extensively, and so much functionality are tied into the treeview and its events.
Aug 23 '12 #7

Post your reply

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