- Joined
- Aug 3, 2015
- Messages
- 2
- Reaction score
- 0
SELECT [Inventory Table].*, [Inventory Table].Part, [Equipment List Table].Equipment, Nz(DSum("[Quantity]","[Return Table]","[Part]='" & [Forms]![Inventory Form].[Part Text] & "'"))-Nz(DSum("[Quantity]","[Requisition Table]","[Part]='" & [Forms]![Inventory Form].[Part Text] & "'"))+Nz(DSum("[Quantity]","[Add Stock Table]","[Part]='" & [Forms]![Inventory Form].[Part Text] & "'"))+Nz(DSum("[Quantity]","[Adjustment Table]","[Part]='" & [Forms]![Inventory Form].[Part Text] & "'"))+Nz(DSum("[Quantity on Hand]","[Inventory Table]","[Part]='" & [Forms]![Inventory Form].[Part Text] & "'")) AS [Current]
FROM [Equipment List Table] INNER JOIN ([Inventory Table] INNER JOIN [Equipment Parts Table] ON [Inventory Table].Part = [Equipment Parts Table].Part) ON [Equipment List Table].Equipment = [Equipment Parts Table].Equipment
ORDER BY [Inventory Table].Part;
FROM [Equipment List Table] INNER JOIN ([Inventory Table] INNER JOIN [Equipment Parts Table] ON [Inventory Table].Part = [Equipment Parts Table].Part) ON [Equipment List Table].Equipment = [Equipment Parts Table].Equipment
ORDER BY [Inventory Table].Part;