VBA & Macro Problems

Fix Access VBA Code and Buttons by Checking Trusted Locations

John WilsonJohn Wilson Nov 25, 2026 869 views

Question details

The user needs to restore VBA code and command button functionality in an Access database by checking its trusted location.

Fix Access VBA Code and Buttons by Checking Trusted Locations
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.
Before you start

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.

Solution 1Recommended

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.

1
Open Trust Center settings

In Access, select File > Options > Trust Center, then click Trust Center Settings.

2
Add the database folder

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.

3
Save and reopen

Click OK to save the location, close the database, and reopen it from the trusted folder path.

4
Test the code

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.

Add the Access database folder to Trusted Locations
Network locations: Network Trusted Locations may require a separate Trust Center setting or administrator approval. Use them only when the network folder and its contents are trusted.
Free Microsoft Office alternative

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.

Use a familiar interface for everyday Office tasks.Open and edit common Microsoft Office formats, including DOCX, XLSX, and PPTX.Move existing documents and spreadsheets into a lightweight workspace.Keep Access database and VBA troubleshooting in Microsoft Access.
microsoft office alternative - wps office

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.