3144 Error (1 Viewer)

cyd44

Registered User.
Local time
Today, 12:21
Joined
Oct 30, 2011
Messages
85
I have an update statement in Access VBA as follows:-

Code:
Dim strSQL As String
strSQL = " UPDATE [siezure_event]" & _
         " SET [Seizure_Class] = '" & gC1Desc & "'," & _
         " WHERE ([Patient_UID] = '" & gName & "' AND [Siezure_Type]=1)"
Debug.Print strSQL
DoCmd.RunSQL strSQL

My debug print statement shows all values as correct but I am still getting the 3144 syntax error on the DoCmd.RunSQL strSQL and also tried DoCmd.RunSQL(strSQL). Got error on both

Could anyone help
 

jdraw

Super Moderator
Staff member
Local time
Today, 07:21
Joined
Jan 23, 2006
Messages
15,406
" SET [Seizure_Class] = '" & gC1Desc & "'," & _

This comma is NOT required. There may be more but this syntax issue is an error.
 

cyd44

Registered User.
Local time
Today, 12:21
Joined
Oct 30, 2011
Messages
85
Thanks, had not noticed the comma
 

Users who are viewing this thread

Top Bottom