启动Access 2007时如何强制用户处理安全警告? [英] How to force user to deal with the Security Warning when starting Access 2007?

查看:172
本文介绍了启动Access 2007时如何强制用户处理安全警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户启动具有宏和vba的Access 2007数据库时,将显示安全警告.我希望用户处理此警告,因此,如果未启用内容,则用户将无法使用数据库.

When a user start an Access 2007 database that have macros and vba, a security warning is shown. I want the user to deal with this warning, so if the the content is't enabled, the user should not be able to use the database.

现在,我使用一个名为AutoExec的宏(打开一个类似于菜单的窗体),并且该宏在用户处理安全警告之前运行.但是我想检查是否启用了内容,如果没有启用,我将显示一个表格,通知用户应该启用该内容.

Now I use a macro named AutoExec (opens a form that works like a menu), and that macro is run before the user deal with the security warning. But I want to check if the content is enabled and if not I will show a form that inform the user that they should enable the content.

所以我实际上要问的是如何做到这一点:

So what I'm actually asking for is how do I do this:

  1. 如果未启用vba和宏 ->显示表单信息"
  2. 如果启用了vba和宏 ->显示开始菜单"表单
  1. If vba and macros is not enabled -> show form "information"
  2. If vba and macros is enabled -> show form "start menu"

推荐答案

好吧,过了一会儿,我得到了解决方案.感谢您为我提供了正确的答案.

Ok, after a while I have the solution. Thanks for the answers who led me the right way.

这篇文章很有帮助.

在AutoExec宏中,我有两行:

In the AutoExec-macro, I have two lines:

第一行:Conditions: [CurrentProject].[IsTrusted]=False,然后选择要打开的女巫表单,在这种情况下,它是有关安全警告表单的信息"

Line one: Conditions: [CurrentProject].[IsTrusted]=False and then I choose witch Form I want to open and in this case it is the "info about security warning form"

第二行:Conditions: [CurrentProject].[IsTrusted]=True,现在打开开始菜单表单"

Line two: Conditions: [CurrentProject].[IsTrusted]=True and now open the "start menu form"

仅此而已!

这篇关于启动Access 2007时如何强制用户处理安全警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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