从 MSAccess 打开 MSAccess 时如何跳过 Autoexec 宏? [英] How to skip Autoexec macro when opening MSAccess from MSAccess?

查看:28
本文介绍了从 MSAccess 打开 MSAccess 时如何跳过 Autoexec 宏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个 MSAccess MDB,它需要打开其他 MDB 并运行一堆代码来比较两个 Access MDB 以查找代码差异、查询差异等.目标是验证任何生产 MDB 都没有从原始部署中改变.

So I have an MSAccess MDB that needs to open other MDB's and run a bunch of code that will compare two Access MDB's to find code differences,query diffs,etc. The goal being to verify any production MDB has not been altered from the original deployment.

我的问题是,许多这些 Access 应用程序都有 Autoexec 宏,并且没有简单的方法可以在不运行 autoexec 宏的情况下调用 .OpenCurrentDatabase.

My problem is that many of these Access apps have Autoexec macros and there is no simple way to call .OpenCurrentDatabase without running the autoexec macro.

如何使用 CODE 跳过宏?

How can I just skip the macro using CODE?

我知道我可以按住 shift 键.我知道我也可以打开和关闭该选项.

I know I can hold down the shift key. I know I can turn that option on and off too.

推荐答案

启动时运行的代码可能不在 autoexec 宏中,它可能在启动形式中,因此,您可能希望考虑以编程方式按下通过 API 的 shift-key':

Code run at start-up may not be in an autoexec macro, it may be in a startup form, therefore, you may wish to consider 'programmatically pressing the shift-key' through APIs:

http://www.mvps.org/access/api/api0068.htm

这篇关于从 MSAccess 打开 MSAccess 时如何跳过 Autoexec 宏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆