0

I am getting syntax error for below code: Please help

 db.Execute "UPDATE Account_Manager_Details" _
    & "SET count = count + 1 " _
    & "WHERE ID = " & id & ";"

Thanks You.

Erik A
  • 30,261
  • 11
  • 41
  • 58

1 Answers1

1

You need a space between the table name and the "SET" statement.

db.Execute "UPDATE Account_Manager_Details "

It's a good idea to assign your SQL statement to a string before you execute it, then you can see exactly what you are doing.

sSQL = "update account_manager_details ... " _
db.execute sSQL, dbfailonerror
Lord Peter
  • 3,343
  • 2
  • 31
  • 32