Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 381
  • Last Modified:

Bypass TRUST Security Option to your mde (accde) using VBA code

How do you bypass TRUST Security Option to your mde (accde) using VBA code
1 Solution
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You don't. You can add your database location to the Trusted Locations on the machine via a Registry entry:

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\A ccess\Security\Trusted Locations\Location2]


AllowSubFolders (REG_DWORD) = 1
Path (REG_SZ) "C:\MyTrustedDatabaseFolderNo2"

Each "Location" must have a unique name, so you may want to use a random number to do this. Also, if this is a network location, you'll have to set this:

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\A ccess\Security\TrustedLocations]


AllowNetworkLocations(REG_DWORD) = 1

Note also that altering the registry can be considered a security breach. Make SURE that you alert the user (via some form of interface message, or something) that you're doing this and make THEM accept these changes. In some corporate venues not doing this, and altering security settings in the registry would be a fireable offense.

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now