D
Doctor
I continue to get an "invalid SQL error" with the following SQL. When I copy
the sql from the immediate window into a query, it runs fine.
Here is the code generating the sql statment.
'Create Link in tblLLCRegLink
If Not IsNothing(strGroupID) Then
Me.LLCRegGroupID.Requery
Me.LLCRegGroupID.Value = strGroupID
strSQLa = "INSERT tblLLCRegLink ( LLCRegGroupID, LLCRegID ) " & _
"SELECT " & strGroupID & " AS Expr1, " & strGroup & " AS Expr2 ;"
Debug.Print strSQLa
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL2
DoCmd.SetWarnings True
Me.sfrmLLCRegLink.Requery
Here is a sample SQL statement generated in the Immediate window.
INSERT INTO tblLLCRegLink ( LLCRegGroupID, LLCRegID ) SELECT 9 AS Expr1, 281
AS Expr2 ;
I'm not sure what to do. Any help would be tremendously appreciated.
Thanks.
And may I say, I love this site! Constantly find help here (even if I only
post once a month or so) Kudos to those of you who are willing to help those
like me.
the sql from the immediate window into a query, it runs fine.
Here is the code generating the sql statment.
'Create Link in tblLLCRegLink
If Not IsNothing(strGroupID) Then
Me.LLCRegGroupID.Requery
Me.LLCRegGroupID.Value = strGroupID
strSQLa = "INSERT tblLLCRegLink ( LLCRegGroupID, LLCRegID ) " & _
"SELECT " & strGroupID & " AS Expr1, " & strGroup & " AS Expr2 ;"
Debug.Print strSQLa
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL2
DoCmd.SetWarnings True
Me.sfrmLLCRegLink.Requery
Here is a sample SQL statement generated in the Immediate window.
INSERT INTO tblLLCRegLink ( LLCRegGroupID, LLCRegID ) SELECT 9 AS Expr1, 281
AS Expr2 ;
I'm not sure what to do. Any help would be tremendously appreciated.
Thanks.
And may I say, I love this site! Constantly find help here (even if I only
post once a month or so) Kudos to those of you who are willing to help those
like me.