0

I have some SQL where I am getting a syntax error, but cant work out why:

The Code:

CurrentDb.Execute "UPDATE [MS Access;pwd=" & strPassword & ";database=" & DBpath & "\" & DBnameVoice & "].[" & tblhistoric & "] " & _
         "SET NudgeSent = '" & SendNudge & "' " & _
         "WHERE [ID] = '" & UID & "'"

Why I am confused: I have the exact same code but to update a different column and it works fine, what am I missing?

Error Received:

Syntax error in UPDATE Statement

Similar code I have the does work:

CurrentDb.Execute "UPDATE [MS Access;pwd=" & strPassword & ";database=" & DBpath & "\" & DBnameVoice & "].[" & tblhistoric & "] " & _
         "SET AllocatedTo = '" & Allocateto & "' " & _
         "WHERE [ID] = '" & UID & "'"
Erik A
  • 31,639
  • 12
  • 42
  • 67
dmorgan20
  • 353
  • 8
  • 33

0 Answers0