0

An access database vba UPDATE SQL command has stopped working after Microsoft .NET Framework 4.8 Version 4.8.03761 installation today.

Users encounter the message:

"Run-time error '3340': Query " is corrupt.

The code that now fails is:

Public Function UpdateMachine()

Dim TEST_SQL_command As String

TEST_SQL_command = "UPDATE [People] " & SET [Machine] = '" & ComputerUsed & "' WHERE [Personid] = " & UserPersonID & ";"

DoCmd.SetWarnings False
DoCmd.RunSQL (TEST_SQL_Command)
DoCmd.SetWarning True

DoCmd.Save

End Function
Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
  • `"UPDATE [People] " & SET [Machine] = '"` this doesn't look right, should it be `"UPDATE [People] SET [Machine] = '"` – Nathan_Sav Nov 13 '19 at 15:48

1 Answers1

0

Looks like your SQL String could cause the issue. You have SET and WHERE out of the string

TEST_SQL_command = "UPDATE [People] SET [Machine] = '" & ComputerUsed & "' WHERE [Personid] = " & UserPersonID & ";"
tomBob
  • 128
  • 6
  • That's not the issue. See the duplicate, this is a highly specific issue introduced by a Windows Update. – Erik A Nov 13 '19 at 18:18