Fix Access Switchboard Code Module Errors After Copying a Database
Question details
The user needs to troubleshoot Microsoft Access switchboards or startup forms that fail to display data or lose their code modules after an ACCDB database file is copied or restored.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Copying or restoring an ACCDB file to a new folder, device, or trusted location.
- Observed behavior
- The Switchboard or startup form stops displaying data, or the VBA code module appears deleted, empty, or generates errors.
Verify that your destination folder has sufficient read/write permissions and ensure you have a backup of the original working ACCDB file before modifying settings.
Verify the Record Source and Inspect the Code Module
Check if the switchboard form is properly linked to its source table and verify the integrity of the underlying VBA code module.
If you are using Microsoft's Switchboard Manager, it relies heavily on a specific linked table to obtain its menu data. If this connection breaks, the switchboard fails to load.
Open the copied database in Microsoft Access, right-click your Switchboard form in the Navigation Pane, and select 'Design View'. Open the Property Sheet and ensure the 'Record Source' property points to a valid table or query.
Look at the Navigation Pane to verify that the table or query referenced in the Record Source actually exists in the copied database.
While in Design View, click 'View Code' in the Tools group on the ribbon. Check whether the module is empty, if the code is present but not executing, or if compiling the code (Debug > Compile) produces a specific error.

Confirm Trusted Locations and Security Settings
Microsoft Access may block VBA code execution if the new folder location is not designated as a trusted location.
Looking for a Lightweight Office Suite? Try WPS Office
While WPS Office does not include a database management tool like Microsoft Access, it serves as an excellent, lightweight alternative for your daily document, spreadsheet, and presentation needs. Enjoy high compatibility with Microsoft Word, Excel, and PowerPoint without the heavy subscription costs.
- 1. Download the Installer: Visit the official WPS website and download the free installer for your operating system.
- 2. Install the Software: Run the setup file and follow the on-screen prompts to complete the installation.
- 3. Open Your Files: Launch WPS Office and seamlessly open your existing Word, Excel, or PowerPoint documents.

Frequently Asked Questions
Why is my Access switchboard blank after copying the database?
This typically happens if the switchboard's record source table is missing in the new database environment, or if macros and VBA code are disabled because the new location is not set as a Trusted Location in the Access Trust Center.
How do I fix a deleted code module in a copied ACCDB file?
If the code module appears completely deleted after copying, it might be due to file corruption during the transfer or interference by backup/syncing software. Try exporting all objects to a brand-new blank database, or restore the file from a known good backup.
What is a Trusted Location in Microsoft Access?
A Trusted Location is a specific folder designated in the Access Trust Center settings where databases are considered inherently safe. Access will automatically enable macros and VBA code modules for files stored in these locations without prompting you with security warnings.
Where can I get more help if my Access database code is still broken?
If you have verified the record sources and trusted locations but the problem persists, it is highly recommended to seek assistance from the official Microsoft Access Tech Community forums where database experts can review specific error codes.




