Fix Access VBA Code and Buttons by Checking Trusted Locations
Question details
The user needs to restore VBA code and command button functionality in an Access database by checking its trusted location.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- An Access database is opened after its location or security settings may have changed.
- Observed behavior
- VBA code and command buttons may not run when the database is opened from an untrusted location.
Confirm the folder path of the database you are opening and verify that you trust the database and its source. Only add folders to Trusted Locations if you trust all files stored in them.
Add the Access database folder to Trusted Locations
Use this method when Access blocks VBA code or command buttons because the database folder is not trusted.
In Access, select File > Options > Trust Center, then click Trust Center Settings.
Select Trusted Locations, click Add new location, and browse to the folder containing the database. Select the subfolder option only if you also trust the files in those subfolders.
Click OK to save the location, close the database, and reopen it from the trusted folder path.
Use the command button or run the affected VBA procedure again. If Access still displays a security warning, review its message and your organization's macro settings.

Enable database content from the security warning
Use this option if Access displays an Enable Content button and you trust the database.
Work with Office files using WPS Office
WPS Office is a free, lightweight alternative for documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format compatibility make it easy to bring existing files into your workflow. It does not replace Microsoft Access or fix Access VBA security settings.

Frequently Asked Questions
Where are Trusted Locations in Access?
In Access, go to File > Options > Trust Center > Trust Center Settings > Trusted Locations.
Why did my Access database stop running VBA after I moved it?
The new folder may not be trusted. Check the database's current path, then add that folder under Trusted Locations if you trust its contents.
Why is my trusted location no longer listed?
Security settings may have changed or been reset, or an administrator may manage them through policy. Check the Trusted Locations list and contact your administrator if you cannot restore the setting.
Should I trust a network folder for an Access database?
Only trust a network folder if you trust its contents and users who can modify them. Network Trusted Locations may require an additional Trust Center setting or administrator approval.




