stock QTY ON HAND problem

New Contributor

AvailableQuantity: Sum([totalPurchaseData].[purchase_item_quantity])+(Nz((SELECT SUM(QuantityTransferred) FROM Transfers WHERE Transfers.ItemCode = [totalPurchaseData].[Item Code] AND Transfers.WareHouseCode = [Warehouse_tbl].[Warehouse_ID]AND Transfers.ProjectCode = [Projects_tbl].[Project_ID]),0))-(Nz((SELECT SUM([sales_Item_Quantity]) FROM [totalSalesData] WHERE [totalSalesData].[Item Code] = [totalPurchaseData].[Item Code] AND [totalSalesData].[Warehouse_ID] = [totalPurchaseData].[Warehouse_ID] AND [totalSalesData].[Project_ID] = [totalPurchaseData].[Project_ID]),0)) the problem is: when i transfer items to a warehouse that i didnt make an earlier purchase to, the quantity won't show the transfer + value. Please help!

1 Reply

@gcreed 

Is this supposed to be a query? If so, it appears to have been only partially copied into your post.

Also, what does it mean to say "...the quantity won't show the transfer + value." What DOES it show instead? An error? The wrong sum? Or something else?

Thanks.