How to display totals from a subform on a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JTB07
    New Member
    • Mar 2010
    • 1

    #1

    How to display totals from a subform on a form

    Hello,

    I have a form that displays project information, and on that form is a subform that displays info about invoices related to that project. This info includes things like invoice number, invoice amount, status (y/n), etc. The subform is in datasheet view and gets its data from a query. I'd like to add three fields to the form that display totals from the items in the subform. These totals are:

    -The sum of all invoice amounts
    -The sum of all invoice amounts for invoices that have a status of 'y'
    -The sum of all invoice amounts for invoices that have a status of 'n'

    Is this possible, and if so, do you have any advice for how to go about it?

    Thank you very much for the help.
  • RuralGuy
    Recognized Expert Contributor
    • Oct 2006
    • 375

    #2
    Put your summing controls in the Footer of the SubForm which does not show in Datasheet View. You can then reference these controls from the ControlSource of controls on your MainForm.

    Comment

    Working...