Table of Content
    Access Database Repair

    How to Fix Access Runtime Error 7960?

    Table of Content

      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:

      • Run-time-error 7960: There was an error compiling the function.
      • Macro Single Step, with an Error Number 7960.
      • 7960: Failed to handle method call.
      • Internal error: The Interpreter has already been closed.
      • Error 7960: Microsoft Access has encountered a problem and needs to close. We are sorry for the inconvenience.

      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:

      • Incorrect queries or functions in VBA code.
      • The data type is mismatched in the syntax or queries used in the code.
      • Incorrect or corrupted queries.
      • Invalid method or function properties.
      • System is out of memory.
      • The database file is corrupted.
      • Trying to call a non-existing object.
      • Missing tables or queries in database files.
      • The database file is locked by another user (when using the Access database in multi-user environment).
      • Issue with the form’s data source.

      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:

      • In Microsoft Access, navigate to File. 
      • Click the Create option and then right-click on the Macro option.
      Microsoft Access File Navigation and Macro Creation
      • Now, click Design and then select the Single Step option.
      Microsoft Access Design Option and Selecting Single Step
      • Click on the Run option.
      Clicking the Run Option in Microsoft Access
      • You will get a prompt to save the macro before executing. Save it by clicking on the Yes option.
      Prompt to Save Macro in Microsoft Access and Clicking 'Yes' to Confirm
      • The Macro Single Step dialog box is displayed. You can see the information related to the macro, the macro action, and the error number.
      • Click the Step option.

      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:

      • Open Access VBA Editor.
      • Go to Tools and then click the References option.
      Access VBA Editor - Navigating to Tools and Selecting References
      • In the References dialog box, check the list of available references and make sure all are selected. If any reference is not selected, then select it and click OK.
      Checking and Selecting All References in Microsoft Access References Dialog Box

      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:

      • Open the Access database in which you are getting the error.
      • In the Access ribbon, click the Database Tools option and then click Visual Basic. The VBA Editor is displayed.
      Opening the Access Database, Accessing Database Tools, and Opening the VBA Editor
      • The Project Explorer displays all the objects, including modules, database names, form names, reports, etc.
      • You can click on any object to view the code associated with it. Check all the queries and syntaxes, and make changes if required.

      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:

      • Press Ctrl+Alt+Del simultaneously.
      • Select the Task Manager option.
      • In the Task Manager dialog box, click Processes.
      • You will see a list of currently running applications on your system.
      • Recognize the problematic program, click on it, and then click the End Task option.

      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:

      • First, ensure the database file is closed (in which you are getting the error).
      • Then, open your Access application.
      • Go to the Templates page and then click Blank Database
      • Select File and then select Close.
      • Now, navigate to Database Tools and then click Compact and Repair Database.
      • Select the affected database in the Database to Compact From dialog box.
      • Select the Compact option.
      • You will find the compacted and repaired database at the exact location where you actually stored the database file.

      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.


      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.

      Was this article helpful?

      No NO

      About The Author

      Monika Dadool linkdin

      Monika Dadool is a Technical content writer at Stellar who writes about QuickBooks, Sage50, MySQL Database, Active Directory, e-mail recovery, Microsoft365, Pattern Recognition, and Machine learning. She loves researching, exploring new technology, and Developing engaging technical blogs that help organizations or Database Administrators fix multiple issues. When she isn’t creating content, she is busy on social media platforms, watching web series, reading books, and searching for food recipes.

      Leave a comment

      Your email address will not be published. Required fields are marked *

      Image Captcha
      Refresh Image Captcha

      Enter Captcha Here :

      Related Posts


      Why Choose Stellar?

      • 0M+


      • 0+

        Years of Excellence

      • 0+

        R&D Engineers

      • 0+


      • 0+


      • 0+

        Awards Received