是否有“收盘时"通知? Access VBA事件? [英] Is there an "On Close" event for MS Access VBA?

查看:43
本文介绍了是否有“收盘时"通知? Access VBA事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在关闭访问数据库之前(无论用户何时关闭数据库),我正在尝试执行某些特定操作.

Am trying to perform some specific actions, before closing the access database (whenever the database is closed by the user).

我知道我们可以在关闭本书之前使用Excel VBA中的Auto_Close函数强制事件. MS Access VBA中有类似的功能吗?如果是这样,将不胜枚举.

I know we can use Auto_Close function in Excel VBA to force events before closing the book. Is there a similar function in MS Access VBA? If so, an example would be appreciated.

如果您需要更多信息,请告诉我. 谢谢.

Please let me know if you need more information. Thank you.

推荐答案

否,没有MS Access的应用程序退出或关闭事件.常见的方法似乎是一直打开隐藏的表单,然后在该表单的unload事件中处理应用程序的任何逻辑(始终会在Access完全关闭之前将其触发).

No, there isn't an application quit or close event for MS Access. The common approach seems to be having a hidden form open at all times and then handling any logic for the application within the unload event for that form (which will always be fired before Access completely closes).

这篇关于是否有“收盘时"通知? Access VBA事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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