DB_Queen
New member
- Local time
- Today, 15:38
- Joined
- Sep 20, 2021
- Messages
- 22
Hello experts,
I'm attempting to update a record in a table by running a quick SQL statement behind a button a user clicks on a form. For some reason, I'm getting a "syntax error in criteria expression" error on the below. It looks perfectly normal to me and I am stumped as to why I'm getting this error. Any ideas?
DoCmd.RunSQL "UPDATE TABLENAME " _
& "SET FIELDNAME = '" & Me.COMBOBOX & "', FIELDNAME2= False, FIELDNAME3 = "" WHERE TABLENAME.ID = " & Me.txtID & ""
I'm attempting to update a record in a table by running a quick SQL statement behind a button a user clicks on a form. For some reason, I'm getting a "syntax error in criteria expression" error on the below. It looks perfectly normal to me and I am stumped as to why I'm getting this error. Any ideas?
DoCmd.RunSQL "UPDATE TABLENAME " _
& "SET FIELDNAME = '" & Me.COMBOBOX & "', FIELDNAME2= False, FIELDNAME3 = "" WHERE TABLENAME.ID = " & Me.txtID & ""