B
Billp
I Have the following which gives me the error
"Syntax Error (comma) in Query
'([Link_ID_PS],[Packing_Slip_REV],[Item_Code],[Description],[Qty_Packing_Slip])'
strOtherFields =
",[Packing_Slip_REV],[Item_Code],[Description],[Qty_Packing_Slip]"
strsql = "INSERT INTO [tblOtherShipped_Packing_Slip] " _
& "([Link_ID_PS]" & strOtherFields & ")" _
& " SELECT ([Link_ID_PS]" & strOtherFields & ")" _
& " FROM tblOther_Packing_Slip" _
& " WHERE [Link_ID_PS] = " & Me![PS_ID] 'field id
numeric
Debug.Print strsql
Link_ID_PS is numeric
Me![PS_ID] is numeric
The Immediate window gives me,
INSERT INTO [tblOtherShipped_Packing_Slip]
([Link_ID_PS],[Packing_Slip_REV],[Item_Code],[Description],[Qty_Packing_Slip])
SELECT
([Link_ID_PS],[Packing_Slip_REV],[Item_Code],[Description],[Qty_Packing_Slip]) FROM tblOther_Packing_Slip WHERE [Link_ID_PS] = 1
Thanks in advance
must be the weekend.
Best regards
"Syntax Error (comma) in Query
'([Link_ID_PS],[Packing_Slip_REV],[Item_Code],[Description],[Qty_Packing_Slip])'
strOtherFields =
",[Packing_Slip_REV],[Item_Code],[Description],[Qty_Packing_Slip]"
strsql = "INSERT INTO [tblOtherShipped_Packing_Slip] " _
& "([Link_ID_PS]" & strOtherFields & ")" _
& " SELECT ([Link_ID_PS]" & strOtherFields & ")" _
& " FROM tblOther_Packing_Slip" _
& " WHERE [Link_ID_PS] = " & Me![PS_ID] 'field id
numeric
Debug.Print strsql
Link_ID_PS is numeric
Me![PS_ID] is numeric
The Immediate window gives me,
INSERT INTO [tblOtherShipped_Packing_Slip]
([Link_ID_PS],[Packing_Slip_REV],[Item_Code],[Description],[Qty_Packing_Slip])
SELECT
([Link_ID_PS],[Packing_Slip_REV],[Item_Code],[Description],[Qty_Packing_Slip]) FROM tblOther_Packing_Slip WHERE [Link_ID_PS] = 1
Thanks in advance
must be the weekend.
Best regards