如何防止Access关闭 [英] How to prevent Access from closing

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

问题描述

我有一个用户必须在关闭之前完成的表单。我已经禁用了窗口x按钮并使用我自己的退出按钮。
当选择

时,它会检查用户是否已完成输入,否则它将取消关闭。

然而,用户仍然可以点击任务栏并关闭我的

申请。

有什么方法可以防止这种情况。

谢谢

亚历克斯

I have a form which the user must complete before closing. I have
disabled the window x button and use my own exit button. When selected
it checks to see if the user has completed the entries otherwise it
cancels the close.
However, the user can still right click on the task bar and close my
application.
Is there any way of preventing this.
Thanks
Alex

推荐答案

将逻辑放在'卸载事件的形式中,以检查表格是否已经

已完成或未完成。如果没有,请设置取消=真,并且表单不会被b / b
关闭,从而使应用程序无法关闭。


-

Doug Steele,Microsoft Access MVP
http:/ /I.Am/DougSteele

(请不要发电子邮件!)


< al ******** @ hotmail.com>在消息中写道

news:11 ********************** @ g43g2000cwa.googlegr oups.com ...
Put logic in the form''s Unload event to check whether the form has been
completed or not. If it hasn''t, set Cancel = True, and the form won''t be
able to close, thereby keeping the application from closing.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

<al********@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
我有一个用户必须在关闭之前完成的表单。我已经禁用了窗口x按钮并使用我自己的退出按钮。选中后,它会检查用户是否已完成输入,否则会取消关闭。
但是,用户仍然可以右键单击任务栏并关闭我的
申请。
有没有办法防止这种情况。
谢谢
Alex
I have a form which the user must complete before closing. I have
disabled the window x button and use my own exit button. When selected
it checks to see if the user has completed the entries otherwise it
cancels the close.
However, the user can still right click on the task bar and close my
application.
Is there any way of preventing this.
Thanks
Alex



这不会阻止用户右键单击任务栏按钮

然后选择关闭它。

Alec

This does not stop the user from right clicking on the taskbar button
and selecting close to close it.
Alec


否,没有(可靠的)方法来防止这种情况发生。当所有其他方法都失败时,

用户*将*从机器上拔下电源线。


要求用户以前做的事情是个坏主意他们可以关闭您的表格或申请表。相反,为您的用户提供一种方式

来退出他们正在做什么,和/或某种方式回到他们不得不停下来的时候。

No, there''s no (reliable) way to prevent this. When all else fails,
users *will* yank the power cord from the machine.

It is a _really_ bad idea to require users to do things before they can
close your form or application. Instead, provide your users with a way
to "back out" of what they were doing, and/or a way to get back where
they were when they had to stop.


这篇关于如何防止Access关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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