Stefano
Stefano

Reputation: 199

Access VBA: issue on UPDATE statement (3144)

In my Access VBA, I have this code:

CurrentDb.Execute "UPDATE [Table Name] SET Note = 'aaaa' WHERE [Codice Progetto] = 'XX';"

But I get:

Run-time error '3144': Syntax error in UPDATE statement

Doing some tests, I figured out the issue is related to the field Note. I have checked that all the other part of the code are ok. I don't know why this issue because field Note exists and its characteristics are correct.

enter image description here

Upvotes: 0

Views: 118

Answers (1)

Lee Mac
Lee Mac

Reputation: 16015

Note is a reserved word in MS Access.

Therefore, change your SQL to:

CurrentDb.Execute "UPDATE [Table Name] SET [Note] = 'aaaa' WHERE [Codice Progetto] = 'XX';"

Upvotes: 1

Related Questions