Does anybody see the error in the following sql statement? Some of the lines below have been moved to the line below because of the width limit of this text input.
'Add Quota
sqlString = "INSERT INTO Quota ( Quota_Key, Comp_Plan_Key, Category, " & _
"QuotaPeriod, TargetPeriod, AttainmentPeriod, RateType ) " & _
"SELECT " & quotaKey & " AS Expr1, " & _
Chr(34) & newCompPlanKey & Chr(34) & " AS Expr2, " & _
Chr(34) & rst("MS_Category") & Chr(34) & " AS Expr3, " & _
Chr(34) & rst("QuotaPeriod") & Chr(34) & " AS Expr4, " & _
Chr(34) & rst("TargetPeriod") & Chr(34) & " AS Expr5, " & _
Chr(34) & rst("AttainmentPeriod") & Chr(34) & " AS Expr6, " & _
Chr(34) & rst("RateType") & Chr(34) & " AS Expr7;"
DoCmd.RunSQL (sqlString)
'Add Quota
sqlString = "INSERT INTO Quota ( Quota_Key, Comp_Plan_Key, Category, " & _
"QuotaPeriod, TargetPeriod, AttainmentPeriod, RateType ) " & _
"SELECT " & quotaKey & " AS Expr1, " & _
Chr(34) & newCompPlanKey & Chr(34) & " AS Expr2, " & _
Chr(34) & rst("MS_Category") & Chr(34) & " AS Expr3, " & _
Chr(34) & rst("QuotaPeriod") & Chr(34) & " AS Expr4, " & _
Chr(34) & rst("TargetPeriod") & Chr(34) & " AS Expr5, " & _
Chr(34) & rst("AttainmentPeriod") & Chr(34) & " AS Expr6, " & _
Chr(34) & rst("RateType") & Chr(34) & " AS Expr7;"
DoCmd.RunSQL (sqlString)