Problem with text box calculation

pikou

Registered User.
Local time
Yesterday, 19:28
Joined
Jul 20, 2004
Messages
24
Hi all,
I have a form tha is based on a table and a subfrom on another.The two tables have a valid 1 to many relationship and all is well record viewing wise.
Now I have some financial data like the fee that was agreed upon on the main form on a text box .On the subform the user can enter the payments made on variou dates.
What I want is to be able to have a text box on the main form that will do the subtraction (fee - all the various payments) and display that on the main form.Is this possible cause I cant seem to be able to do it and if it is not, is there another way for this to be done.
Thank you very much for your time :)
 
Sum the payments in a control (txtPaymentsTotal) in the footer of the subform, the control source of which is "=sum(me!PaymentscontrolName)", but without the quotation marks .

On the form in a control create an unbound control (txtBalance), the control source of which is "=nz(me!fee,0) - nz(forms!MainFormName!subFormName.form.txtPaymentTotals,0)", but without the quotation marks.

The nz function must be used because if ther fee or payments total is null, the equation will not calculate.
 

Users who are viewing this thread

Back
Top Bottom