One Form, 2 subforms calculation problems

spartansFC

Registered User.
Local time
Today, 15:16
Joined
Aug 26, 2007
Messages
13
Hi

i'm having trouble, passing the subform total onto the main form, i've managed to do it when just using one subform by using:

=[frmInvoicePayments Subform].Form!InvoiceTotal

but now i've got 2 subforms.

one is a year subform, the other subform allows me to enter different statement amounts per year, i've attached a picture so you can see what i mean.

I've tried modifying the above statement to something listed below, but it doesn't seem to work, i get a #Name? error

=[frmStatementYear!frmStatementPayments Subform].Form!DueAmount

Can someone tell me what i'm doing wrong

thanks

Mikie

statementdbasescreenrh9.png
 
First I would drop the spaces from your form names..... always causes problems someplace! Try doing the calculation in the main form... instead of referencing a calculated field in a subform. Something like
=[frmInvoicePayments Subform].Form!InvoiceTotal -
[frmInvoicePayments Subform].Form!InvoiceRecieved
or whatever your field names are......
I sometimes use the "expression builder... " That way I know there are no typos :)
 
Thanks Curtis, worked a treat, i've never used the "expression builder", could never get my head round it, but the penny's dropped at last

thanks again

Mikie
 

Users who are viewing this thread

Back
Top Bottom