如何在计算机锁定时关闭Access? [英] How to close out Access when a computer is locked?

查看:97
本文介绍了如何在计算机锁定时关闭Access?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现vb解释了如何检测空闲时间并在空闲时自动关闭访问权限并且效果很好,但是如果有人锁定他们的计算机但保持访问正常运行,则这不起作用。

有没有办法让这个工作或只是强制关闭这个访问数据库,而没有其他程序或数据库,一旦计算机被锁定?


用于在空闲时关闭的代码仅仅是微软建议的代码( http://支持.microsoft.com / kb / 128814

I found the vb that explains what to do to detect idle time and close out access automatically when idle and it works great, however this does not work if someone locks their computer but leaves access running.

is there a way to either get this working or to simply force this access database to close, and no other programs or databases, the moment a computer is locked?

the code used to close on idle is merely the microsoft-suggested code (http://support.microsoft.com/kb/128814)

推荐答案

我无法想象当键盘不工作时如何检测空闲时间锁住了。如果键盘被锁定,那么计算机就处于空闲状态。


也许如果您发布了我们应该关注的代码,那么我们可以(只有可能 - 这应该是可用的在问题中)能够提供帮助。
I can''t imagine how it can be possible to detect idle time without working when the keyboard is locked. If the keyboard is locked then the computer is idle.

Maybe if you posted the code we''re supposed to be looking at then we may (only may - this should have been available in the question) be able to help.


原始问题中的microsoft链接建议将此代码添加到您在Access开始时强制打开的表单,并进一步修改该表单'的属性保持隐藏,以便没有人关闭它。这很好,但如果您仍在尝试微调已经偶尔使用的数据库的某些组件,则可能会很烦人。


如果您不介意对某个咒语不那么喜欢,请禁用启动交换机中的代码,使其在打开新的交换机或表单时不会关闭。您可能还需要禁用尝试在辅助交换机表单中重新打开主交换机的代码。然后,将此代码添加到您的主交换机而不是隐藏的表单。


因此,如果您有工作要做,并且不能冒险被不合时宜地关闭而没有保存,你可以关闭主交换机而不用担心它 - 好吧,不用担心它:它是我们正在讨论的Windows ...
The microsoft link in the original question suggests adding this code to a form that you force to open upon the start of Access, and further modify that form''s properties to remain hidden so that no one closes it out. This is fine but it can be annoying if you are still trying to fine-tune some components of a database that is already seeing occasional use.

If you don''t mind being less fancy for a spell, disable the code in your startup switchboard such that it does not close out when a new switchboard or form is opened. You might also need to disable the code that attempts to re-open the main switchboard in your secondary switchboard forms. Then, add this code to your main switchboard instead of a hidden form.

So, if you have work to do and can''t risk being interrupted with an untimely close without save, you can just close the main switchboard and not worry about it - well, worry less about it: it is Windows we''re talking about...


我用了一个修改版来测试with:
I used a modified version to test with :
展开 | 选择 | Wrap | 行号


这篇关于如何在计算机锁定时关闭Access?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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