title: How to SUM and Subtract from different table columns in MSACCESS
body: <p>I have three tables named: Student, StudentPayment and CreditAmount. I want to show the result that how much a student owe to the school. In student table there is a column named TotalPayable which is the total amount to be paid to the school and in StudentPayment there is a column named TotalPaid which is the total payment each time he made and in the CreditAmount table there is a column named CreditAmount which is the waiver amount which the school gives to the student. So I made a query : </p>
  
  <pre><code>SELECT Student.TotalPayableAmount - 
         Sum(StudentPayment.TotalPaid, CreditAmount.WaiverAmount) AS Total_Due
    FROM (Student INNER JOIN StudentPayment ON Student.ID = StudentPayment.ID) 
   INNER JOIN CreditAmount ON (Student.ID = CreditAmount.ID) AND (Student.ID = CreditAmount.StudentID)
   GROUP BY Student.ID, Student.TotalPayableAmount, CreditAmount.WaiverAmount 
  </code></pre>
  
  <p>but it shows error. </p>
  
  <p>Actually I want to make the SUM of TotalPaid and CreditAmount and then want to subtract it from the TotalPayable from the student table. Can anyone help me on this please. Thanks in advance.</p>