Access 2016: Make an Executable Database

You can save an Access database as an executable-only file to enhance security and improve performance. This prevents users from modifying the database design, while still providing the functionality required by most users.

If you plan to distribute your Access database to users, consider saving it as an executable-only file.

An executable file (or a compiled binary file) is a database application file that has been saved with all the Visual Basic Access (VBA) code compiled. An Access compiled binary file is saved with an .accde extension (as opposed to the .accdb extension of the regular Access database).

An Access compiled binary file contains no VBA source code. Users cannot change the design of objects such as forms, reports, and macros in an .accde file.

A normal Access database (i.e. a non-compiled database), on the other hand, allows users to modify these objects and change the VBA source code.

Save a Database as an Executable-only File

We'll now save the Music database that we've created throughout this tutorial as an executable-only file in .accde format.

You should split your database before saving it as an executable-only file. This will allow you to distribute the front-end to users, while having a central back-end that stores the data.

  1. Screenshot of Access.

    Go to the File Menu

    Ensuring you have the front-end database open, click the File tab on the Ribbon to bring up the File menu.

  2. Screenshot of the Access File menu.

    Choose the ACCDE Format

    Select Save As from the left menu.

    From the Save Database As pane, select Make ACCDE and click Save As.

  3. Screenshot of the file browser.

    Save the Executable File

    Name the file and select a location for the ACCDE file, and click Save.

Test the Executable

Now that the ACCDE file has been saved, open it as a user would, and try to modify a form, report, or macro.

  1. Screenshot of security warning message.

    Open the File

    Either double-click on the file in File Explorer, or open it from within the Access file menu.

    If you get a security warning, click Open.

    See below for details on removing the security warning.

  2. Screenshot of contextual menu with Design View disabled.

    Try to Open Design View

    Once the database is open, try to edit an object in Design View.

    In the left navigation pane, right-click on a form, report, or macro to bring up its contextual menu. Observe that the Design View option is grayed out and disabled.

    Note that users can still edit queries.

    And if it's a split database, they won't be able to edit the design of the tables (as those are in the back-end database).

Remove the Security Warning

If users receive the security warning as seen in the above screenshot, it is probably because the executable database file is being opened from a non-trusted location.

Users can simply click Open to open the file. But they will need to do this every time they open the file.

An alternative is to remove the security warning altogether.

If this warning is due to the file being opened from a non-trusted location, the user will need to add the location to their trusted locations in the Access Options.

Here's how to do that.

  1. Screenshot of the File menu.

    Select File > Options

    Select Options from the File menu.

  2. Screenshot of the options with Trust Center highlighted.

    Select the Trust Center

    Select Trust Center from the list of options, then click Trust Center Settings....

  3. Screenshot of the Trusted Locations.

    Select Trusted Locations

    On the left menu, select Trusted Locations, then click Add new location... in the main window.

  4. Screenshot of the Trusted Location dialog box.

    Add the New Location

    Enter (or browse to) the location where the executable file will be opened from.

    Click OK (then OK twice again to close each of the other Options windows).

A Word of Caution about Trusted Locations

Users should be careful about which locations are added as a trusted location. Rather than setting the whole Documents folder as a trusted location, it would be better to have a sub-folder or another dedicated folder, just for (trusted) Access databases.

Folders like the Documents folder tend to be the default location for files. So it could end up with hundreds of files from many disparate sources — including files downloaded from the Internet. So, setting a folder like this to be a trusted location carries a significantly higher risk than setting a smaller, sub-folder as a trusted location.

Microsoft Access Runtime

Generally, when you distribute an Access database, each user will need their own copy of Access.

However, if they don't have Access, you can package and distribute your application with Access 2016 Runtime.

Microsoft Access 2016 Runtime is a free download that enables users to open and work with Access databases. As long as no customization is required on reports etc, then they can use Access Runtime instead of the full Access application. And if you're distributing the executable file, then they wouldn't be able to customize it anyway.

You can download Microsoft Access 2016 Runtime from the Microsoft website.