title: How do I calculate amounts from fields in different tables in Access 2013
body: <p>I want to keep track of credits/laway/rent to own info.  </p>
  
  <p>I have <code>[Clients]</code> <code>table</code>, <code>[Credit]</code> and a child <code>[payments]</code> table, to keep track of payments of multiple credits.  </p>
  
  <p>I want to make a Split form where I can see credit details ex. (type, amount of credit, amount of credit currently paid and last amount due) with a record of all payments done on the subform.   </p>
  
  <p>Now I ran into blockade when trying to use <code>sum()</code> or <code>Dsum()</code> to calculate the "amount of Credit currently paid" and "amount of credit due" in a text box on the form.</p>
  
  <p>I think I´m missing something in the criteria part for I don´t know how to pass the current creditID key to group and calculate ???</p>
  
  <p>the closest I´ve gotten is  <code>=DSuma("[MontoPagado]","Pagos","[IDCreditoFK]")</code> but this adds all up and I really need something like:</p>
  
  <pre><code>"amount due" =[table1]![Field1] - SUM([table2]![Field2]) Based on Current "creditID"
  </code></pre>
  
  <p>Its a basic credit/layaway plan payments database I hope someone can help for I have spent days with very Little sleep and this is the only thing holding me up...
  Download copy here ----> <a href="https://mega.nz/#!gp0lSRLA" rel="nofollow">https://mega.nz/#!gp0lSRLA</a></p>
  
  <p>Thank you in advance!!</p>