How to Fix Access Runtime Error 7960?

Summary: The error 7960 in MS Access can occur due to different reasons. Read this guide to know the possible causes behind this error and the troubleshooting methods to fix it. You’ll also get to know about an advanced Access database repair tool that can help you quickly fix the error if corruption in the database file is the reason behind this error.

When working on a database file in MS Access, you may encounter the error 7960, preventing you from saving or editing the data. It usually occurs while opening the forms, reports, or other components of the database file. This error may also occur while working on the VBA code. There are different error messages related to this runtime error, such as:

Causes of Access Runtime Error 7960

The error 7960 usually occurs when the Microsoft Access database crashes or fails to respond for any reason. The error can occur due to different reasons. Some of the common causes are:

Methods to Fix the Runtime Error 7960 in Access

Sometimes, the Access macro error 7960 can occur when using a large-sized array with less available memory or storage. So, make sure there is enough storage space on the hard drive. You can optimize your VBA code to minimize memory usage or perform disk cleanup to free up some storage. If this did not fix the error, then follow the below troubleshooting methods:

Method 1: Use Single Step Macro Option

You can encounter the ?Access VBA runtime error 7960 – There was an error compiling this function? when using the VBA code. It usually occurs when there is an issue with the macro you are trying to execute to perform a particular action in a form or report in the database. To troubleshoot this, you can use the Macro Single-Step option in Access. It helps you view the macro’s clear flow, including the actions’ results so that you can easily isolate the problematic action of the macro. To test the macro using the single-step macro option in Access, follow these steps:

Method 2: Check and Fix Missing References

Sometimes, you can get the Access error 7960 due to missing references library in Access. It usually occurs when you use functions/methods in your VBA code related to missing library components. To fix the error, you can check the missing references library in Access. Here?s how to do so:

Method 3: Check the VBA Code

The Access error 7960 commonly occurs in VBA code when you try to use incorrect objects, functions, methods, property references, or SQL queries. It may also occur if you try to use non-existing reports or forms. You can review the VBA code and try to fix all the incorrect syntaxes or typos in the code. Follow the below steps:

Method 4: Check the Form Record Source Properties

The Access error 7960 can also occur if the Microsoft Access application fails to read the form or other objects in the code due to incorrect form record source property settings. In Access Form, record source property refers to the data source property associated with the form. If for any reason, there is a mismatch between the form record source property name and the name of the object used in the query, you may experience an error. You can check the Access form?s record source property settings by opening the form in Design View. Then, check if the record source setting is pointing to the correct form in the Property Sheet window.

Method 5: Close Conflicting Applications

You can experience the Access error 7960 if there is any conflict between Access and other applications. You can check and close the conflicting applications via the Task Manager. Here?s how to do so:

Method 7: Re-register Windows Registry

Re-registering the Windows registry can also help fix the error 7960 in Access. It is a basic troubleshooting method to fix the corrupted DLL files. This method usually works if there are missing registry entries related to the Microsoft Access application. You can use the Regedit.exe to overwrite the default settings.

Method 8: Check and Reinstall Microsoft .NET Framework

The .NET Framework plays a primary role in running Visual Basic applications in Access. Sometimes, issue in the redistributable framework can also cause the VBA runtime error. You can check and reinstall the latest Microsoft .NET Framework to fix the issue.

Method 9: Repair Access Database File

Corrupted queries, macros, forms, tables, and other components in the Access database file can also cause the Access error 7960. You can use the Compact and Repair tool in MS Access to repair the damaged or corrupted database file. Here?s the procedure to do so:

The Compact and Repair utility can repair corrupt or damaged Access database files, but sometimes Compact and Repair utility fails to fix major inconsistencies. In such a case, you can use some other third-party Access database repair tools. Stellar Repair for Access is one such tool that can repair highly corrupt Access database (.mdb/.accdb) files. The tool can extract all the elements from the corrupted database file and save them to a new database file with complete integrity. It lets you preview all the recoverable queries, macros, and other elements before saving them. Download the software demo version to preview and verify the accuracy of recovered data and the software’s functionality.

Closure

If you are getting the Access error 7960, then check for the conflicting applications, verify the VBA code, check the Form Properties, and other methods discussed above to resolve the error. If the error has occurred due to corrupted objects in the database file, then use Stellar Repair for Access. It is a professional and secure Access database repair tool to repair highly corrupted database files. The software has a simple and intuitive user interface that makes the repair process quick and seamless. The tool is compatible with Windows 8, 10, and later editions.

Related Post

Exit mobile version