Enter an amount and subtract it from balance

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am setting up a database and I am looking set up a form where I have a
balance
and I will enter a payment and the payment will be deducted from the balance.
 
I made like this: made a query with a calculated field :
[InvoiceValue]-Sum([PaymentValue]). Take care to put 'Sum"' on Total for
PaymentValue and 'Expression' for the calculated field.
2. Change the Join type of tables from query to Left Join instead of default
Inner. This is very important, otherwise you will only see substracted values
for those amounts who has such values to substract.
3. I made a form based on this query, but delete the calculated field from
query and put instead of it an unbound text box with:
=[InvoiceValue]-Nz([SumofpaymentValue],0). In my case if I don't have a
payment it must be considered 0 and then the rest to be paid will be
InvoiceValue.

Hope it helps,
diana
 
Back
Top