I've created a database to track payments made to vendors for Purchase Orders.
In the database VPOs are paid by PaymentID and there can be more than 1 VPO in a payment ID.
The problem I'm having now is that when I try to query the total balance on one or multiple VPOs, it's only showing me the balance on VPOs that have had alteast 1 payment made.
Are my relationships correct? I don't know why it won't show me VPOs that haven't had a payment made.
Here is the code for the query:
SELECT VPO.VPONumber, VPO.VendorCode, [VPO Items].TotalCost
FROM (VPO INNER JOIN [VPO Items] ON VPO.VPONumber = [VPO Items].VPONumber) INNER JOIN ([Payment ID] INNER JOIN [VPO Payment] ON [Payment ID].PaymentID = [VPO Payment].PaymentID) ON VPO.VPONumber = [VPO Payment].VPONumber
GROUP BY VPO.VPONumber, VPO.VendorCode, [VPO Items].TotalCost;
In the database VPOs are paid by PaymentID and there can be more than 1 VPO in a payment ID.
The problem I'm having now is that when I try to query the total balance on one or multiple VPOs, it's only showing me the balance on VPOs that have had alteast 1 payment made.
Are my relationships correct? I don't know why it won't show me VPOs that haven't had a payment made.

Here is the code for the query:
SELECT VPO.VPONumber, VPO.VendorCode, [VPO Items].TotalCost
FROM (VPO INNER JOIN [VPO Items] ON VPO.VPONumber = [VPO Items].VPONumber) INNER JOIN ([Payment ID] INNER JOIN [VPO Payment] ON [Payment ID].PaymentID = [VPO Payment].PaymentID) ON VPO.VPONumber = [VPO Payment].VPONumber
GROUP BY VPO.VPONumber, VPO.VendorCode, [VPO Items].TotalCost;
Last edited: