Calculating two fields from a form and a subform

NVAlice

New member
Local time
Today, 12:28
Joined
May 6, 2005
Messages
9
I have created a form with a subform and I want to subtract the total of the subform from the total of the form to get a balance; i.e. I have a total of expenses on the form and the subform is a record of payments against the expenses and I want to show a balance.

I have been all over this one and can not make the expression work. I have been working in Access for some time but this one has me stumped, I am probably over thinking it or just can't see the forest for the trees.

I have gone into the expression builder and created the formula but when I complete the process I get the #name? error statement in the field.

Can anyone help me with this problem? Thank you in advance. You can send responses to sharon.dunn@newmont.com.
 
Last edited:
=nz(DSum("[subformsourtableNumberfield]","[subformsourcetable]","[Fkeyinysubformsourcetable] = [PkeyMainformsourcetable]"))+[MainformNumberfield]

This is the example of my calcs on the form.
 
Thank you I will try this formula
 

Users who are viewing this thread

Back
Top Bottom