ติดปัญหError ตรงเพิ่มStockMonth_Before_Query.TotalBefore ค่ะ
**TotalBefore คือQty ของตารางยกยอดค่ะ พอเอามาLEFT JOIN ด้วยError
SELECT Receiving_SUM_month.ItemID, Receiving_SUM_month.DateIn, Receiving_SUM_month.QtyReceived, Shipment_SUM_month.QtyShip, StockMonth_Before_Query.TotalBefore
FROM Receiving_SUM_month
LEFT JOIN Shipment_SUM_month
ON (Receiving_SUM_month.ItemID = Shipment_SUM_month.[Material/Part] AND Receiving_SUM_month.DateIn = Shipment_SUM_month.DateOut)
LEFT JOIN StockMonth_Before_Query
ON (Receiving_SUM_month.ItemID = StockMonth_Before_Query.ItemID)
UNION
SELECT Shipment_SUM_month.[Material/Part], Shipment_SUM_month.DateOut, Receiving_SUM_month.QtyReceived, Shipment_SUM_month.QtyShip, StockMonth_Before_Query.TotalBefore
FROM Receiving_SUM_month
RIGHT JOIN Shipment_SUM_month
ON (Receiving_SUM_month.ItemID = Shipment_SUM_month.[Material/Part] AND Receiving_SUM_month.DateIn = Shipment_SUM_month.DateOut)
LEFT JOIN StockMonth_Before_Query
ON (Receiving_SUM_month.ItemID = StockMonth_Before_Query.ItemID) ;
ปล. รูปแสดงข้อมูลที่ต้องการขั้นแรก