I need to run a query from two tables.
Table 1 is Orders; there is a non-calculated field named Estimated Cost and the OrderID among other fields.
Table 2 is Payments, and there is a OrderID, Payment and Date among other fields. Both tables are related by the OrderID field. There could be multiple payments to a single order on the Payments table.
I need:
1- Sum all payments in the Payment table grouped by order.
2- Subtract above sum from the correspondent Estimated Cost on table Orders.
3- Display the result on 2 above if it is >0.
I'm not too experienced in Access and this is really driving me crazy. I someone help me achieve this.
Thanks in advance!
Bookmarks