Calculating the Sum of two different fields in two different table

G

Guest

I am trying to find the "sum" of "OrderTotal" from "Orders Table" and "sum"
of "PaymentAmount" from "Payments Table" then find the "Balance" by
subtracting them. The two tables are joined at "OrderID" field however, they
both have "customerID" field also. When I try this in one query, Group by
"customerID" the "SumOfOrderTotal" is not correct. But when I use two
separate queries the calculation is right. Any suggestion?
 
G

Guest

use a totals query to get the sum of each value you want. place both totals
queries in a third query and subtract
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top