Sub form

C

cath

Hi

I wonder if you could help me.

I am trying to create a text box on a form to sum the amounts in the
subform but doesn't seem to be working.

Do you think you could advise.

Kind regards

Catherine
 
S

Stefan Hoffmann

hi Catherine,
I am trying to create a text box on a form to sum the amounts in the
subform but doesn't seem to be working.
Do you think you could advise.
Place a TextBox in the footer section of your subform, assign
"=Sum([yourFieldName])" as ControlSource.

In the main form use "=[SubformControlName]![SumTextBoxName]" as
ControlSource for your TextBox.

mfG
--> stefan <--
 
B

boblarson

First of all, if you are trying to sum calculated amounts, you will need to
put the calculation on your subform footer and use the whole calculation:

=Sum(Nz([MyField1],0) + Nz([MyField2],0))

The example above assumes you have two fields called MyField1 and MyField2
and you are adding them and then want the sum of them. Now, once you have
that, you can put a text box on the main form with this in the controlsource:

=[YourSubformContainerName]![Form]![YourSumTextBox]

Where it says YourSubformContainerName, make sure to put in the name of the
control on your main form that houses the subform, not necessarily the
subform name itself. If they are both the same, then that's fine but if they
are different you would use the container name and not the form name.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
If my post was helpful to you, please rate the post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top