C
catherine2255
Hi,
I am trying to change my sql into a VBA action:
Original SQL =
UPDATE Tbl2 LEFT JOIN [NW14 for 33] ON Tbl2.Month = [NW14 for 33].Month
SET Tbl2.[Gross to Net] = [NW14 for 33].[Gross to Net], Tbl2.Quantity =
[NW14 for 33].[Quantity], Tbl2.Scrap = [Nw14 for 33].[Scrap],
Tbl2.Rework = [Nw14 for 33].[Rework]
WHERE (((Tbl2.Network)="Network 33"));
The VBA I have got to is:
strSQL="(UPDATE TBL2 LEFT JOIN" _
& " ([NW14 for 33]" _
& " ON Tbl2.Month = [NW14 for 33].Month)" _
& " SET Tbl2.[Gross to Net] = [NW14 for 33].[Gross to Net],"_
& ";Tbl2.Quantity=[NW14 for 33].Quantity,"
& ";Tbl2.Scrap=[NW14 for 33].Scrap,"
& ";Tbl2.Rework=[NW14 for 33].Rework"
& "WHERE (((Tbl2.Network)='Network 33'))"
When I run the VBA I get Syntax Error in Join operation. Any ideas on
how to fix this?
I am trying to change my sql into a VBA action:
Original SQL =
UPDATE Tbl2 LEFT JOIN [NW14 for 33] ON Tbl2.Month = [NW14 for 33].Month
SET Tbl2.[Gross to Net] = [NW14 for 33].[Gross to Net], Tbl2.Quantity =
[NW14 for 33].[Quantity], Tbl2.Scrap = [Nw14 for 33].[Scrap],
Tbl2.Rework = [Nw14 for 33].[Rework]
WHERE (((Tbl2.Network)="Network 33"));
The VBA I have got to is:
strSQL="(UPDATE TBL2 LEFT JOIN" _
& " ([NW14 for 33]" _
& " ON Tbl2.Month = [NW14 for 33].Month)" _
& " SET Tbl2.[Gross to Net] = [NW14 for 33].[Gross to Net],"_
& ";Tbl2.Quantity=[NW14 for 33].Quantity,"
& ";Tbl2.Scrap=[NW14 for 33].Scrap,"
& ";Tbl2.Rework=[NW14 for 33].Rework"
& "WHERE (((Tbl2.Network)='Network 33'))"
When I run the VBA I get Syntax Error in Join operation. Any ideas on
how to fix this?