Link to home
Start Free TrialLog in
Avatar of Mel Brooks
Mel Brooks

asked on

MS Access 2019 error 3340 Query is corrupt

I have an application where I run some simple sql execute statements.  here is an example of one:

currentdb.execute "Update databasebuttons set pagecaption = 'Agency Evaluation',buttonlabel ='Agency Evaluation' where Buttonnum = 1001",dbseechanges

This syntax has worked fine in Access versions 2007 through 2016.  Now in Access version 2019 it throws the error 3340 "Query is corrupt"

What's the deal?   What is the solution to resolve the issue where this will continue to work in 2019 but also work in 2017 - 2016 version?
Avatar of ste5an
ste5an
Flag of Germany image

This is the current broken last Office update: Windows Update causing havoc with Access databases.
If you have  2016 Access :https://support.microsoft.com/en-us/help/4484198/november-18-2019-update-for-office-2016-kb4484198
If not watch here for patches : https://www.askwoody.com/2019/patch-lady-access-bug-will-be-fixed-sooner-versus-later/
Probably best solution to uninstall the offending updates for Access 2019
Just to add a bit, patches are starting to roll out for O365.   The "insiders" channel go their patches last night. Not sure when the rest of the channels will get updated, but Microsoft is moving at light speed on this one.

 O2016 CTR installs should be seeing a patch shortly as well.

Jim.
This page contains info on the Security Updates that were installed for Office products during the November Update.

In the bottom right corner of that page there is a section "MSKB" which lists each of the individual update as a hyperlink.  If you look at updates for KB4484127, KB4484113, KB4484119, you will see the descriptions of the updates for the 2010, 2013, 2016.  As far as I know, there are hotfixes published for A2016 and O365 Click-to-Run, with others coming out quickly.

If you are running A2010 or A2013, I would recommend that you simply uninstall the update associated with your version.
Avatar of Mel Brooks
Mel Brooks

ASKER

I was aware of the KB updates for Access versions 2010 - 2016, but the problem I am having now is with Office 365.  None of the KB updates show up in the update list.  What it shows is an installation of  Microsoft 365 Office Pro Plus.  If I uninstall that entry that was just made in the last 2 days, is that going to completely uninstall the application or just the update?  
The patch for the KB updates don't apply to my system.  Is there a patch for (Fix it) for Office 365?
If you are on the monthly channel, you can force an update of O365 and will get the fix (File/Account/UpdateOptions/UpdateNow)

Jim.
When I click Update Options / Update Now, nothing happens.
ASKER CERTIFIED SOLUTION
Avatar of Luke Chung
Luke Chung
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
" but Microsoft is moving at light speed on this one."
Providing that 'lightspeed' means damn near a month in the case of Access 2013 click-to-run or Access 2019 Volume License
10-Dec-2019 is the expected rollout for those.

The problem doesn't just hit saved queries.
It nails VBA too, for example
DoCmd.SetWarnings False
Dim sSQL As String
sSQL = "UPDATE  tblTempResults SET JobID = 2 where SerialID = 2"
DoCmd.RunSQL sSQL
DoCmd.SetWarnings True

Open in new window

will fail.

Update the code to
DoCmd.SetWarnings False
Dim sSQL As String
sSQL = "UPDATE (select * from tblTempResults) SET JobID = 2 and SerialID = 2"
DoCmd.RunSQL sSQL
DoCmd.SetWarnings True

Open in new window

and it will then succeed

Nick67
Well well, look who showed up :)   Hope life has been treating you well.

<<" but Microsoft is moving at light speed on this one."
Providing that 'lightspeed' means damn near a month in the case of Access 2013 click-to-run or Access 2019 Volume License>>

  All things considered, that's pretty darn fast.  After all, they have to make sure the fix for the patch doesn't cause other problems.

<<Update the code to>>

  Yes that works, but sadly not everyone is capable of updating their code :(

 Jim.
When I first tried the solution for repairing the 365 version, I was getting errors saying that the file couldn't be updated.
What I did as a fix was first run a repair of Office 365 from Control Panel - Programs.  Then restarted the computer and then ran the update successfully.
Glad to hear you are set.

Jim.