vba 赢得秒更新后,MS-access 不会捕获树视图事件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11984274/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 17:19:33  来源:igfitidea点击:

MS-access doesn't catch treeview events after win sec-update

vbams-accessactivex

提问by Teson

Access 2010-application using TreeView (MSComctlLib.TreeCtrl.2) shows and populates as expected but suddenly after windows security patches doesn't fire events back to VBA.

使用 TreeView (MSComctlLib.TreeCtrl.2) 的 Access 2010 应用程序按预期显示和填充,但在 Windows 安全补丁没有将事件回火到 VBA 后突然出现。

Tried with rolling back MSCOMCTL.OCX in /syswow64, but no luck.

尝试回滚 /syswow64 中的 MSCOMCTL.OCX,但没有成功。

Please ping any similar behaviour or hints for fixing the issue.

请 ping 任何类似的行为或解决问题的提示。

regards,

问候,

采纳答案by Andomar

The problem appears to be that the registry entries for mscomctl.ocx are broken after the security update. One solution can be found in this KB article. It suggests to run this batch file as administrator:

问题似乎是 mscomctl.ocx 的注册表项在安全更新后损坏。在这篇知识库文章中可以找到一种解决方案。它建议以管理员身份运行此批处理文件:

reg delete hkcr\typelib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}.0 /f
if exist %systemroot%\SysWOW64\cscript.exe goto 64 
%systemroot%\system32\regsvr32 /u mscomctl.ocx
%systemroot%\system32\regsvr32 mscomctl.ocx
exit
:64 
%systemroot%\sysWOW64\regsvr32 /u mscomctl.ocx
%systemroot%\sysWOW64\regsvr32 mscomctl.ocx
exit

I've verified that this works in our environment.

我已经验证这在我们的环境中有效。

回答by StockB

I opened an Access file developed on 32-bit Access 2013 running on Windows 7 32-bit, and had experienced this problem when opening it on 64-bit Access 2013 running on Windows 8 64-bit.

我打开了一个在 Windows 7 32 位上运行的 32 位 Access 2013 上开发的 Access 文件,并且在运行在 Windows 8 64 位上的 64 位 Access 2013 上打开它时遇到了这个问题。

My solution:

我的解决方案:

Delete the control and add it back again, using the design view on your Access form.

使用 Access 窗体上的设计视图删除控件并重新添加它。

Because the treeview's properties are mostly set programmatically, there should be little to do aside from repositioning it and renaming it.

因为树视图的属性大多以编程方式设置,所以除了重新定位和重命名之外,应该没什么可做的。