I have the following tables:
- Clients
- Payments and charges (client id, sum, date). Sum is positive or negative (payment / charge).
Each client has a "Zero Debt Date" field. When calculating the debt of the student I want to calculate only the debt incurred since that date.
I easily created a query that takes a client id and returns the debt since the Zero Debt Date.
Now I want to show the results in a form.
I have a form in which I display a single client with a subform that shows the payments / charges.
I want to have - in the main form - a control that shows the current debt of the client - calculated from the ZDD date.
I created a text box control, and tried using SQL inside, I also tried DSum, and nothing works. I get a "#Name?" message in the box.
Advice?