关闭Access中的模态窗体并访问模块代码
我继承了一个Access数据库,用于在SQL中导入一些数据。 MDB 以模态模式打开一个表单:没有可见的 Access 菜单栏或按钮。我可以使用 Visual Studio“数据连接”工具查看表格内容,但看不到模块的代码。
我看过这个问题 这里,但那里的答案并不是我真正需要的。有没有办法强制表单关闭(并访问模块)或提取 VBA 代码?
[编辑] 我正在使用 Access 2007,不确定原始开发人员使用的是什么。
I've inherited a Access database that is used to import some data in SQL. The MDB opens with a form, in a modal mode: no Access menubar or buttons are visible. I can view the tables with content by using the Visual Studio 'Data Connection' tool, but I cannot see the module's code.
I've looked at this question here, but the answers there aren't really what I need. Is there a way to either force the form to close (and access the modules) or to extract the VBA code ?
[EDIT] I am using Access 2007, not sure what the original developer used.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
打开数据库时按住 Shift 键。这将阻止它加载正在运行的自动脚本,并允许您访问表、查询和 VBA 脚本。
Hold down the shift key when you open the database. This will prevent it from loading the automatic script it's running and allow you to gain access to the tables, queries, and VBA scripts.
这是对 Michael Todd 对 edosoft 评论的回复的相当长的补充或评论。
不要选择启用内容,而是检查启动选项((文件->选项->当前数据库->显示表单)或(工具->启动->显示表单))并删除记下表单的名称,并确保选中“允许完整菜单(同一页)”。您可能还想按 Alt+F11 显示代码,并检查启动代码,最后查看是否有 AutoRun 宏并重命名。
编辑评论
您不必打开 mdb 来更改启动表单,例如,可以使用您希望更改的 mdb 的全名和路径从另一个 mdb 运行此类代码。
This is a rather long addendum to, or comment on, Michael Todd's reply in response to edosoft's comment.
Rather than choosing to enable the content, check the start-up options (either (file->options->current database->display form) or (tools->start up->display form)) and remove the name of the form, having taken a note, and ensure that Allow Full Menus (same page) is ticked. You may also like to press Alt+F11 to display code, and check that for start-up code, finally, see if there is an AutoRun macro and rename it.
EDIT re Comments
You do not have to open an mdb to change the start-up form, for example, code such as this could be run from another mdb using the full name and path of the mdb you wish to change.
按钮关闭功能:
Button close with function: