H hucheunghugo New member Local time Today, 20:22 Joined Apr 11, 2022 Messages 23 Apr 12, 2022 #1 Code: DoCmd.RunSQL "Update VIPcustomer SET VIPcustomer.Condition = 1 WHERE ((VIPcustomer.VIPID) = &X);" I have tried different way, it stills shows syntax error.
Code: DoCmd.RunSQL "Update VIPcustomer SET VIPcustomer.Condition = 1 WHERE ((VIPcustomer.VIPID) = &X);" I have tried different way, it stills shows syntax error.
H hucheunghugo New member Local time Today, 20:22 Joined Apr 11, 2022 Messages 23 Apr 12, 2022 #2 X is a integer
cheekybuddha AWF VIP Local time Today, 12:22 Joined Jul 21, 2014 Messages 3,218 Apr 12, 2022 #3 Code: DoCmd.RunSQL "Update VIPcustomer SET Condition = 1 WHERE VIPID = " & X & ";"
H hucheunghugo New member Local time Today, 20:22 Joined Apr 11, 2022 Messages 23 Apr 12, 2022 #4 Thanks a lot
cheekybuddha AWF VIP Local time Today, 12:22 Joined Jul 21, 2014 Messages 3,218 Apr 12, 2022 #5 I refer you back to this previous suggestion: similar problem Use a variable so you can check the SQL from your concatenation: Code: Dim strSQL As String strSQL = "Update VIPcustomer SET Condition = 1 WHERE VIPID = " & X & ";" Debug.Print strSQL DoCmd.RunSQL strSQL Last edited: Apr 12, 2022
I refer you back to this previous suggestion: similar problem Use a variable so you can check the SQL from your concatenation: Code: Dim strSQL As String strSQL = "Update VIPcustomer SET Condition = 1 WHERE VIPID = " & X & ";" Debug.Print strSQL DoCmd.RunSQL strSQL