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?
Microsoft AccessSQL

Avatar of undefined
Last Comment
Jim Dettman (EE MVE)

8/22/2022 - Mon
ste5an

This is the current broken last Office update: Windows Update causing havoc with Access databases.
John Tsioumpris

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
Jim Dettman (EE MVE)

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.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Dale Fye

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.
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?
Jim Dettman (EE MVE)

If you are on the monthly channel, you can force an update of O365 and will get the fix (File/Account/UpdateOptions/UpdateNow)

Jim.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Mel Brooks

ASKER
When I click Update Options / Update Now, nothing happens.
ASKER CERTIFIED SOLUTION
Luke Chung

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Nick67

" 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
Jim Dettman (EE MVE)

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.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Mel Brooks

ASKER
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.
Jim Dettman (EE MVE)

Glad to hear you are set.

Jim.