Hello all.
I'm getting this error on DoCmd.RunSQL stSQL statement:
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'. (Error 3129)
My stSQL is program generated but Debug.Print shows this as the resulting string for runSQL processing:
INSERT INTO tblcf_GroupTreatmentForms (GR_CopyIndicator, GR_PFR_AutoID_PatientFormsRegistry, GR_AxisIa, GR_GroupName, GR_GroupType, GR_Reliability, GR_Participation, GR_GroomingHygiene, GR_Behavior, GR_GroupTheme, GR_PatientProgress, GR_InteractionsWithOther) SELECT 'C', GR_PFR_AutoID_PatientFormsRegistry, GR_AxisIa, GR_GroupName, GR_GroupType, GR_Reliability, GR_Participation, GR_GroomingHygiene, GR_Behavior, GR_GroupTheme, GR_PatientProgress, GR_InteractionsWithOther FROM tblcf_GroupTreatmentForms WHERE GR_PFR_AutoID_PatientFormsRegistry = 646
I can't tell what's wrong with the syntax. I'm trying to duplicate a record in a table and this same mechanism is working fine for other tables.
Any help/insight greatly appreciated.
I'm getting this error on DoCmd.RunSQL stSQL statement:
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'. (Error 3129)
My stSQL is program generated but Debug.Print shows this as the resulting string for runSQL processing:
INSERT INTO tblcf_GroupTreatmentForms (GR_CopyIndicator, GR_PFR_AutoID_PatientFormsRegistry, GR_AxisIa, GR_GroupName, GR_GroupType, GR_Reliability, GR_Participation, GR_GroomingHygiene, GR_Behavior, GR_GroupTheme, GR_PatientProgress, GR_InteractionsWithOther) SELECT 'C', GR_PFR_AutoID_PatientFormsRegistry, GR_AxisIa, GR_GroupName, GR_GroupType, GR_Reliability, GR_Participation, GR_GroomingHygiene, GR_Behavior, GR_GroupTheme, GR_PatientProgress, GR_InteractionsWithOther FROM tblcf_GroupTreatmentForms WHERE GR_PFR_AutoID_PatientFormsRegistry = 646
I can't tell what's wrong with the syntax. I'm trying to duplicate a record in a table and this same mechanism is working fine for other tables.
Any help/insight greatly appreciated.