B
Bill Phillips
I am having a syntax problem that seemes easy but I don't understand it. I
have the following SQL statement:
DoCmd.RunSQL "INSERT INTO tblDiscrepantItems (prod, qtyonhand, qtycnt,
SXExt, CountExt, DollarDiscrepant, PercentDiscrepant)" & _
"VALUES ('" & rs1!prod & "', " & rs1!qtyonhand & ", " & rs1!qtycnt & ", " &
rs1!SXExt & ", " & rs1!CountExt & ", " & dblDollarDiscrepant & ", " &
dblPercentDiscrepant & ")" & _
"WHERE ((" & dblMinDollar & " <= " & absDollarDisc & ") and (" &
absDollarDisc & "< " & dblMaxDollar & "));"
I keep getting the following error: Run-time error 3137. Missing semicolon
( at end of SQL statement. I am inserting these records into a predefined
table so I'm sure what the error is.
Thanks in advance.
have the following SQL statement:
DoCmd.RunSQL "INSERT INTO tblDiscrepantItems (prod, qtyonhand, qtycnt,
SXExt, CountExt, DollarDiscrepant, PercentDiscrepant)" & _
"VALUES ('" & rs1!prod & "', " & rs1!qtyonhand & ", " & rs1!qtycnt & ", " &
rs1!SXExt & ", " & rs1!CountExt & ", " & dblDollarDiscrepant & ", " &
dblPercentDiscrepant & ")" & _
"WHERE ((" & dblMinDollar & " <= " & absDollarDisc & ") and (" &
absDollarDisc & "< " & dblMaxDollar & "));"
I keep getting the following error: Run-time error 3137. Missing semicolon
( at end of SQL statement. I am inserting these records into a predefined
table so I'm sure what the error is.
Thanks in advance.