Share via


How to Fix Access Error 3340: Query is Corrupt?

After installing security updates for the Microsoft Access software, you may encounter an error "Query is corrupt". This post discusses in detail about the error and also mentions the ways to fix it.

What All You Need to Know About ‘Access Error 3340: Query is Corrupt’?

The VBA runtime error 3340 occurs after installing the Microsoft Access security updates. The error message reads as:

Query ‘query_name’ is corrupt.

The issue was reported after the November 2019 security update. The update causes an Access database to fail when running an update query for:

  • Modifying the data of a table (query that updates a table)
  • A WHERE clause having entries in the Criteria row in the query designer

The error impacts MS Access 2010, 2013, 2016, 2019, and Office 365 versions. Also, it can impact programs that use Update queries. The programs include SQL Server Migration Assistant (SSMA), Power Query, or VBA code running in Excel, Word, etc. that use the Access database engine to connect to the database file (.mdb/.accdb) and update them using queries.

Ways to Fix the Access Error ‘Query is Corrupt’

Following are the two ways to resolve the ‘Access error: Query is corrupt’:

Uninstall Microsoft Security Updates

This is the most obvious solution you can try to fix the issue. Following are the four updates that caused the ‘Access 3340 error.’

Security update for Access 2010: KB4484127

Security update for Access 2013: KB4484119

Security update for Access 2016: KB4484113

Security update for Office 365: KB3085368

Check if you can run Update queries after uninstalling the security updates. If this doesn’t help, proceed with the following solution.

Apply Microsoft Patches

Microsoft has released patches to resolve the issue on all the builds of MS Access. Apply a patch for your MS Access version and check if it fixes the ‘query is corrupt’ error.

 Info
On applying the Microsoft fix, you may receive a message "No products affected by this package installed in the system". This happens if you’ve installed a click-to-run (C2R) installation of MS Office, instead of an MSI installation. In such a case, you must apply the instructions for the C2R version once the fix is available.

A security update was released on December 10, 2019 via the Windows Server Update Services (WSUS) and said to automatically apply to fix the issue for MSI installations. However, you may have to manually apply the Microsoft fixes for the following:

  • Refer to KB2986256 to fix the issue for Access 2010
  • Refer to KB2965317 to fix the issue for Access 2013
  • Refer to KB4484198 to fix the issue for Access 2016
  • For Office 365, you can manually run the update to fix the error by clicking on Use File > Account > UpdateOptions > UpdateNow from your Office application.
 Info
The Microsoft fixes for Access 2016 and 2013 versions are available for the MSI builds only.

End Note

If your Access shows an error ‘3340: the query is corrupt’ on running an Update query, then check if you have installed the Microsoft security update released on November 12, 2019.

You can try to resolve the problem by uninstalling the security updates or by applying an appropriate Microsoft fix for your MS Access version. If you are stuck or need further assistance, contact Microsoft Support. Getting the desired support may take time, but make sure to get the expert help.  

In case, you need to access queries from a corrupt Access database file, using an Access repair tool, like Stellar Repair for Access can help. It repairs corrupted .mdb/.accdb files and restores queries, forms, modules, macros, and other database objects.