Experience Stellar's software with confidence! 100% safe to download.
Free Download For Windows

File Repair

How to Fix Error 3340 in MS Access?

Summary:You may encounter the error 3340 in MS Access while executing a query in the database. It usually occurs when there is an issue with the query or recently installed MS Access updates. This article will discuss the Access error 3340 in detail and also mention some possible solutions to fix it. It will also mention an Access repair tool that can help resolve the error if it is caused by corruption in the database.

Free Download For Windows
Free Download For Windows
Table of Content arrow

    The error 3340 - Access query is corrupt - usually appears when you try to run an update query in the Access VBA code. This issue prevents you from modifying data in the database. It can occur if you are using complex SQL queries in Access, such as Nested Update queries or queries that include multiple tables and joins. Besides this, there are many other reasons that may lead to this issue.

    Causes of Error 3340 in MS Access

    This error can occur due to one of the below reasons:

    • Queries are corrupted.
    • The database in which you are running the query is corrupted/damaged.
    • Your system memory configuration failed to handle complex queries.
    • 问题办公室更新。
    • Missing parameters or arguments in the query.
    • The ‘Where’ clause in Update Query is referring to an incorrect record.
    • Complex SQL queries.

    Methods to Fix the MS Access Error 3340

    Below are some methods you can follow to resolve the error 3340 in MS Access.

    Method 1: Install the Latest Office Updates

    Many Access users have reported encountering this error after installing the security patches and the latest Office updates (such asKB4484127,KB4484119,KB4484113, andKB3085368released on November 12, 2019). To address this, Microsoft has released another update. If you’re using Office 2013, you can install the update4484186. You can install the updateKB3085368,如果you’re using Office 16.

    Method 2: Roll Back the Latest Office Update

    If the Access error 3340 occurred after installing the recent Office updates, then you can try to roll back the updates to resolve the issue. To do so, follow these steps:

    • Open your system’sControl Panel.
    • Under programs, clickuninstall a program.

    Click Uninstall A Program

    • UnderPrograms and Features, clickView Installed Updates.

    Click View Installed Updates

    • In theInstalled Updateswindow, search for the below updates:
    • KB4484127 (for Access 2010)
    • KB4484119 (for Access 2013)
    • KB4484113 (for Access 2016)
    • Right-click on the update and clickuninstall.
    • Follow the instructions on the screen to uninstall the update.
    • Once the installation is complete, then restart the system.

    If you fail to uninstall the updates, then follow the next methods.

    Method 3: Change the Database Location to a Trusted Location

    You may also get the error 3340 if your database is not at the trusted location. By default, Access fails to display action queries such as update and delete if your database is at an untrusted location. In this case, you can move the database to a trusted location. Follow these steps:

    • InAccess, go toFileand then clickOptions.

    Click On Access Option

    • In theAccess Optionswindow, selectTrust Center.

    Select Trust Center

    • ClickTrust Center SettingsunderMicrosoft Office Access Trust Center.

    Click Trust Center Settings

    • ClickTrusted Locationson theTrust Centerwindow.

    Click Trusted Locations In Trust Center

    • In theTrusted Locationsdialog box, click onMy Networkcheckbox and selectAllow Trusted Locationsto add a network location.
    • Select Add New location.

    Click Add Location Option in Trusted Locations

    • In theMicrosoft Office Trustedwindow, select one of the following options:

    • In thePathfield, type the path of the location you want to add.
    • Click theBrowsebutton to browse to the location.

    Check Path And Browse Option In Office Trusted Location

    • Click “Subfolders of this location are also trusted“, if you want to specify the subfolders.
    • Once you added a trusted location, selectOK.
    • Now, move the database to the newly added location.

    Method 4: Check and Simplify the Queries

    The error 3340 can occur if there is an issue with the queries in the database. It usually occurs when you run complex SQL queries using joins, numerous tables, or nested functions. So, check the query you’re running and simplify it by removing unwanted joins, functions, or subqueries. Also, check and correct the syntax errors of the query.

    Method 5: Verify and Enable Referential Integrity

    你可以体验到一个运行时错误3340update query in the database with multiple types of table relationships. It usually occurs if the relationship field option - Referential Integrity is disabled. You can try enabling the Referential Integrity option to fix the issue. Here are the steps:

    • In the Access database, go toDatabase Toolsand then chooseRelationships.

    Go To Database Tools To Choose Relationships

    • Double-click on the line between two tables.
    • In theEdit Relationshipswindow, select the checkbox labeled “Enforce Referential Integrity”.

    Enable Enforce Referential Integrity Option

    • ClickOK.
    • Now, close theRelationshipswindow.

    Method 6: Use ADO/DAO Recordsets Query

    You may get the error 3340 in Access when using update queries to update the records. To fix this, you can replace the Update query with the Recordsets query, such as Recordset Object (ADO) function. It helps in simplifying the complex query.

    Method 7: Repair the Database

    The runtime error 3340: Access query is corrupt can occur due to database corruption. You can try repairing the database using the “Compact and Repair” utility in Access. Here are the steps:

    • Open the affectedAccess database.
    • Go to theFilemenu.
    • Click on theInfooption and then selectCompact & Repair Database.

    The repaired database will be saved at the exact location where your original database is located.

    What if the Above Methods Fail to Fix the Access Error 3340?

    If the above methods fail to fix the issue, then you can tryStellar Repair for Access. It is an advanced tool that can repair severely corrupted Access files. It helps repair both .MDB and .ACCDB files and restore the database to its original form with all the data intact. You can try the software’s demo version to evaluate its functionality. The tool is compatible with all Access versions.

    To Conclude

    You may get the Access error 3340 for several reasons, such as issues with the recently installed Access updates, issue with the query, etc. You can try the methods mentioned above to fix the error. If nothing works, you can use Stellar Repair for Access - a professional tool to repair corrupted Access database file. It helps fix the error if it has occurred due to corruption in database file.

    progress
    77% of people found this article helpful

    WHY STELLAR®IS GLOBAL LEADER

    Why Choose Stellar?
    • 0M+

      Customers

    • 0+

      Years of Excellence

    • 0+

      R&D Engineers

    • 0+

      Countries

    • 0+

      PARTNERS

    • 0+

      Awards Received

    • TUV SUD ISO 27001
    • TUV SUD ISO 9001
    • NIST
    • HIPAA Verified