Summary: The Access error 2950 can occur while executing macros. This post explains the reasons behind this error and the solutions to fix it. It also mentions an advanced Access database repair tool that can help fix the error if it has occurred due to corruption in the Access database file.
Macros are used in MS Access to automate tasks and add functionality to reports, forms, and controls in Access database files. While executing macros, you may encounter an error, saying Action failed – Error Number 2950. This error usually occurs when the application fails to read the macros and other objects in the database. Various factors can lead to this VBA error. Let’s understand the causes behind this VBA error and see how to fix it.
Reasons for the MS Access Error 2950
Below are some common reasons that can trigger this error in MS Access:
- When MS Access does not trust the database location.
- When trying to open the database which is in the disabled mode.
- When Macro Settings are disabled.
- If macros are corrupted.
- If the Access DDE refresh option is disabled
- If the Access database is damaged or corrupted.
- If there are incorrect or invalid queries in the VBA code.
Methods to Troubleshoot the MS Access Error 2950
Follow the solutions given below to troubleshoot and resolve the Access database error 2950.
Method 1 – Enable the Database for the Current Session
You can get the Access error 2950 if the macros have been blocked. In such a case, you get an alert message with the option to enable content for this session. When you select this option, it allows you to run the macros temporarily (for the current session).
To enable the database for the current database, follow the below steps:
- Open your affected Access database.
- On the ‘Security Warning’ message bar, click on Options.
- When ‘MS Office Security Options’ dialog box opens, select “Enable content for this session” and then click OK.
Note: Repeat these steps each time when you open the database.
Method 2 – Move the Database to a Trusted Location
You can experience the “Access Error 2950” if the database is not located at a trusted location. You can try moving the database to a trusted location.
Follow the given steps:
- In MS Access, click the File tab and then select Options.
- From the ‘Access Options’ dialog box, select Trust Center > Trust Center Settings.
- Click Trusted Locations and then do any of the following:
- Note paths of the trusted locations listed under ‘User Locations’.
- Add a new trusted location. For this, click on Add new location and then specify the path of the location that you want to add.
Once you have the trusted locations, move the Access database to any one of them.
Method 3 – Check and Enable all Macros (If not enabled)
The Error 2950 in MS Access can also occur if the Macro Settings are disabled. You can check and enable the macros by following these steps:
- Open your Access application.
- Go to File and then click Options.
- Click on the Trust Center option and then select Trust Center Settings.
- In the Trust Center window, click Macro Settings.
- Under Macro Settings, you will see these options:
- Disable all macros without modification
- Disable all macros with modification.
- Disable all macros except digitally signed macros.
- Enable all macros.
Verify whether the “Enable all macros” option is selected or not. If not, then select it and click OK.
Method 4 – Check and Enable Access DDE Refresh Option
You can experience the Access error 2950 if the Access DDE Refresh option is not enabled. If this option is disabled, it can block the macros and Dynamic Database Exchange (DDE) links on the database. You can check the Access option for Dynamic Database Exchange (DDE) and enable it.
To do so, follow the below steps:
- Open your Access database.
- Click File and then Options.
- In the Access Options window, click Client Settings.
Under the Advanced section, check if the Enable DDE refresh option is selected. If not, then select it and click OK.
Enabling the DDE refresh option in Access allows execution of the macros actions and DDE operations, thus help in resolving the Access error 2950.
Method 5 – Check VBA Code
Many Access users have reported the Access error 2950 while using the Validation Rule property and the Validation properties in the VBA code. It usually occurs if you have used macros in the code to enforce certain validation rules. Make sure you’re using the validation properties correctly in the code.
To check the VBA code, follow these steps:
- In the Access database, go to the Database Tools tab.
- Click on Visual Basic.
- In the Visual Basic Editor, check the VBA code.
- Check the syntaxes of properties, methods, etc. used in the macros. If anything is incorrect, correct it.
Method 6 – Repair your Access Database
Corruption in the Access database can alter or damage the code embedded in it, which can lead to the Access error 2950. If you suspect corruption in the database is behind the error, then you can repair it using the built-in utility in MS Access – Compact and Repair.
To use this utility, follow the steps mentioned below:
- Open the affected Access database file.
- Click Info > Compact & Repair Database.
The copy of the repaired database is saved at the same location where the original database is located.
The Compact and Repair utility may not work if the database file is severely corrupted. In this case, you can use a robust Access database repair tool, such as Stellar Repair for Access. This tool can repair highly damaged or corrupted Access database (MDB/ACCDB) files. It can also repair split databases. Also, it can recover all the data, including macros, queries, etc. from the corrupt database with complete integrity and precision. It can help resolve all the corruption-related errors in the Access database.
Final Thoughts
The MS Access Error 2950 usually occurs when the MS Access application fails to read the macros in the database. To resolve this error, you can follow the solutions mentioned in this post. If Access fails to read the macros due to corruption in the database, then you can repair the database using Stellar Repair for Access. It is a secure and reliable Access database repair tool that helps you restore the database with complete integrity.