Calculated Field in a Subform

  • Thread starter Thread starter Michael and Fayann
  • Start date Start date
M

Michael and Fayann

I have a subform (obviously within a form) that I enter multiple checks
(currency) in. I need to calculate the total of all of the checks whether
it is 1 check or 100 checks and then the calculated field needs to be moved
outside the subform into the regular form for futher calculations. How do I
calculate a multiple amount of checks in my subform?
 
Presumably you enter one check per row of the subform.
If the field is called "Amount", you can sum it like this:

1. From the Database window, open your subform in design view.

2. If you do not see a section labelled "Form Footer", choose Form
Header/Footer from the View menu.

3. In the Form Footer section, place a text box with these properties:
Control Source =Sum([Amount])
Format Currency
Name txtTotalAmount

4. Save the subform. Close.

If the subform uses Continuous view, that's all you need to do.
If it uses Datasheet view, you cannot see the total, so will need to bring
it back onto the main form.

5. Open the main form in design view. Add a text box with these properties:
Control Source =[YourSubformNameHere].[Form].[txtTotalAmount]
Format Currency

You can now work with this total. Please do not try to store the total in
the main form's table, unless there is some valid reason why the total
should sometimes be different from the sum of the subform values.
 
Back
Top