views:

225

answers:

2

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.

A: 

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.

barrowc
A: 

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.

David-W-Fenton