在我的*.mdb
文件中,我有一个运行TransferText
的操作的宏,并根据Microsoft means that the document is not trusted向我提供错误编号2950
,我知道它值得信赖!它位于Trust Center
Trusted Locations
。
在工具提示显示This action will not be allowed if the database is not Trusted
的宏中,操作旁边是否有解释点。
我已经尝试过运行一个小型机并对其进行修复,这可能是什么造成的呢?
答案 0 :(得分:1)
方法1:为当前会话启用数据库
使用此方法时,Access 2007将启用数据库,直到您关闭数据库。要为当前会话启用数据库,请按照下列步骤操作: 在消息栏上,单击“选项”。 在“Microsoft Office安全选项”对话框中,单击“启用此内容”,然后单击“确定”。 注意每次打开数据库时都必须重复这些步骤。
答案 1 :(得分:0)
问题可能就像没有首先建立ODBC连接一样简单。我得到了这个宏错误(2950),我最终阅读了所有支持线程,无处可去。
然后我首先安装了我的ERP客户端 - 这是我试图访问的数据库的前端...使用Access。
这样做建立了一个ODBC配置,所以现在当我打开我的Access文件时,在我得到任何触发错误的函数之前就打开了一个ODBC提示符。事后看来,我本来可以安装ERP客户端,只是转到Windows中的ODBC设置,并指向SQL表的连接。
答案 2 :(得分:0)
In my case there was a naming conflict. The macro in turn called a VBA function, and I had inadvertently named the function with the same name as the module it was in. They were both named "RobertsReport". Once I changed the name, everything worked as expected.
Tip: As troubleshooting steps, try running the macro solo by double-clicking on it. If you can, copy only the line that generates the error to a new macro to test it by itself, and of course include any preceding commands it may need to run properly. Once I did this it greatly narrowed down the problem until the lightbulb came on over my head.