Access 2007、VBA、学校的小型项目和信任中心

发布于 2024-08-01 13:21:19 字数 682 浏览 0 评论 0原文

一位朋友请求我帮助为大学的一个小院系建立一个 Access 数据库。 它跟踪一些动物的医疗信息。 问题是,为了使应用程序足够易于使用,我们必须编写一些 VBA 代码来将不同的表单粘合在一起。 当我们打开数据库(或数据库的新版本、更新版本)时,我们会看到 VBA 宏信任的小东西,并且我们很难弄清楚如何消除该警告。 我是一名开源开发人员,也是我所在组织的系统管理员,因此使用我维护的 CA 证书签署 rpm 包通常不是问题...

我朋友的部门使用装有 Novell 的 Windows PC,但他们的计算机支持部门已声明他们不为用户创建的应用程序提供任何支持(即提供由部门 CA 签名的证书),也不提供对计算机的管理员访问权限,以便我们可以更改信任设置。 他们也没有为用户编写应用程序的技能或专业知识。 (谢谢,伙计们,非常有帮助。)

此外,在我们整个大学中,用户被明确指示永远不要单击“是的,我信任这个”按钮。 为了她建立的这个小型访问数据库而对用户进行重新教育是一个问题,因为大约有 20 人将使用它来查找信息。

因为我正在帮助她,所以我倾向于使用存储在共享驱动器上的嵌入式数据库文件在 C# 中完成此操作,但这也属于“用户创建的应用程序”,并且我将无法运行安装程序,因为没有一个人拥有行政权利。

有什么方法可以解决每次有人打开此文件时都需要绕过宏的信任设置的问题吗? 我认为如果我们根本不使用宏而只使用 VBA 就可以了,但事实显然并非如此。

A friend asked for my help putting together an Access database for a small department at a university. It tracks medical info on some animals. The problem is that to make the application easy enough to use, we had to write some VBA code to glue different forms together. When we open the database (or a new, updated version of the database), we get the little VBA Macro Trust thingie, and we're having a hard time figuring out how to get rid of that warning. I'm an open-source developer and my organization's sysadmin, so it's usually not a problem for me to sign rpm packages with the CA Cert I maintain...

My friend's department uses Windows PCs with Novell, but their computer support department has stated that they don't provide any support for user-created applications (i.e. providing a certificate signed by the departmental CA) nor will they provide administrator access to the computers so that we can change the trust settings. They also don't have the skills or expertise to code the application for the users. (Thanks, chaps, mighty helpful.)

Additionally, in our entire University, users are explicitly instructed not to ever, ever click a 'yes, I trust this' button. Re-educating users for the sake of this little access database that she's put together is a problem, since about 20 people will be using it to look up information.

Since I'm helping her, my inclination would be to do it in C# with a embedded database file stored on a shared drive, but that also falls under "user created applications" and I wouldn't be able to run an installer since no one has administrative rights.

Is there any way to work around the need to bypass the trust setting for macros every time someone opens this file? I thought that if we didn't use macros at all and just used VBA it would work, but that's apparently not the case.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

抱着落日 2024-08-08 13:21:19

自从您提到信任中心以来,您显然走在正确的轨道上。 我不使用 A2007,但 2 分钟的谷歌搜索找到了这两篇文章:

其中为 Access 提供的说明如下:

  1. 单击 Microsoft Office 按钮 ,然后单击 Access 选项。
  2. 单击“信任中心”,单击“信任中心设置”,然后单击“受信任位置”。
  3. 如果要创建计算机以外的受信任位置,请选中“允许我的网络上的受信任位置(不推荐)”复选框。
    单击添加新位置。
  4. 在“路径”框中,键入要用作受信任位置的文件夹的名称,或单击“浏览”找到该文件夹​​。
  5. 如果要将子文件夹包含为受信任位置,请选中“此位置的子文件夹也是受信任的”复选框。
  6. 在“描述”框中,键入您想要描述受信任位置用途的内容。
  7. 单击“确定”。

在我看来,这应该可以解决您的问题,尽管它必须在每个用户的计算机上完成。

You're clearly on the right track since you mention the TRUST CENTER. I don't use A2007, but 2 minutes of Googling turned up these two articles:

The instructions given there for Access are:

  1. Click the Microsoft Office Button , and then click Access Options.
  2. Click Trust Center, click Trust Center Settings, and then click Trusted Locations.
  3. If you want to create a trusted location that is not local to your computer, select the Allow trusted locations on my network (not recommended) check box.
    Click Add new location.
  4. In the Path box, type the name of the folder that you want to use as a trusted location, or click Browse to locate the folder.
  5. If you want to include subfolders as trusted locations, select the Subfolders of this location are also trusted check box.
  6. In the Description box, type what you want to describe the purpose of the trusted location.
  7. Click OK.

Looks to me like that should take care of your problems, though it has to be done on each users computer.

弥枳 2024-08-08 13:21:19

您可能会在以下位置找到一些帮助:

http://msdn.microsoft.com /en-us/library/bb421308.aspx#OfficeAccess2007SecurityConsiderations_EnablingExecutableContentDatabases

具体来说:

嵌入式访问宏

在 Office Access 2007 中,您现在可以
将宏嵌入到 VBA 等表单事件中
而不是将它们保存在宏中
作为单独实体的集合。 这
使它们更加便携,因为您
可以复制并粘贴控件
嵌入宏,并且宏仍然存在
与控制。 在许多情况下,一个
用于打开报告的嵌入式宏是
足够的而不是短序列
VBA 来完成相同的任务。 你可以看到
这些嵌入式宏的许多示例
在特色在线数据库中
入门中的模板
打开时出现的访问窗格
无需选择即可访问 2007
数据库。 因为大多数 Access 宏
不是可执行内容,它们是
必要时的重要工具
让您的数据库在所有情况下都能正常工作
情况。

You might find some help on:

http://msdn.microsoft.com/en-us/library/bb421308.aspx#OfficeAccess2007SecurityConsiderations_EnablingExecutableContentDatabases

Specifically:

Embedded Access Macros

In Office Access 2007, you can now
embed macros in form events like VBA
instead of saving them in the Macro
collection as separate entities. This
makes them more portable because you
can copy and paste a control with an
embedded macro, and the macro remains
with the control. In many cases, an
embedded macro for opening a report is
sufficient instead of a short sequence
of VBA for the same task. You can see
many samples of these embedded macros
in the Featured Online Database
Templates in the Getting Started with
Access pane that appears if you open
Access 2007 without selecting a
database. Because most Access macros
are not executable content, they are
an important tool when you have to
make your databases work in all
circumstances.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文