Hi!
I’m going crazy with my DB for a problem I’m trying to solve.
Just to get the idea of the problem, I have 2 tables:
TblA with fields [IDTblA] and [Customer]. The related form is named frmA
TblB with fields [IDTblB], [Payments], [RemainingDebt].
I have also created a form FrmB based on Customer (from TblA) with subform SubFrmB (the latter showing all the fields from TblB) .
So far so good.
Now my problem.
The first data entered in field [RemainingDebt] of TblB for each customer is his initial debt (for unpaid invoices). This field shows no further data.
The field [Payments], of the same table, also gets for each customer the amount of his initial debt and, with minus sign, the payments (made at various dates) for reducing their initial debt.
The filtered SubfrmB shows, for each selected customer:
- in field [RemainingDebt], first row, his initial debt as unique item;
- in field [Payments] his initial debt and, (with minus sign), the list of payments made at various dates.
In the SubfrmB footer I have created a Txt_Sum field with the formula “=Sum([Payments]”.
At any time, Txt_Sum shows for each customer his remaining debt.
Now I need that, every time I register a new payment of a selected customer, in the field [Payments] of the filtered SubFrmB, his initial debt, shown as unique item in field [RemainingDebt] in the same subform, should be changed into the value stored in Txt_Sum (which represents his updated debt).
In other words I need a “countdown” box either in the main form or in the its subform showing the current remaining debt of a selected customer. Any idea?
I’m going crazy with my DB for a problem I’m trying to solve.
Just to get the idea of the problem, I have 2 tables:
TblA with fields [IDTblA] and [Customer]. The related form is named frmA
TblB with fields [IDTblB], [Payments], [RemainingDebt].
I have also created a form FrmB based on Customer (from TblA) with subform SubFrmB (the latter showing all the fields from TblB) .
So far so good.
Now my problem.
The first data entered in field [RemainingDebt] of TblB for each customer is his initial debt (for unpaid invoices). This field shows no further data.
The field [Payments], of the same table, also gets for each customer the amount of his initial debt and, with minus sign, the payments (made at various dates) for reducing their initial debt.
The filtered SubfrmB shows, for each selected customer:
- in field [RemainingDebt], first row, his initial debt as unique item;
- in field [Payments] his initial debt and, (with minus sign), the list of payments made at various dates.
In the SubfrmB footer I have created a Txt_Sum field with the formula “=Sum([Payments]”.
At any time, Txt_Sum shows for each customer his remaining debt.
Now I need that, every time I register a new payment of a selected customer, in the field [Payments] of the filtered SubFrmB, his initial debt, shown as unique item in field [RemainingDebt] in the same subform, should be changed into the value stored in Txt_Sum (which represents his updated debt).
In other words I need a “countdown” box either in the main form or in the its subform showing the current remaining debt of a selected customer. Any idea?
Comment