Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    1
    Thanked 0 Times in 0 Posts

    MS Access 2010 - Sub-report totals in main form

    Hi

    I have a form for suppliers, and I am using a sub report to show the transactions and values that the supplier is carrying out.

    What I would like to do is show the number and value of the supplier transactions in the body of the form. Is this possible ?

    regards

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Do you really have a subreport on a form? That used to be impossible..or do you have a sub form on a form? or a subreport on a report?

    The calculations are performed in the form/report footer of the subreport/form.

    A text box with control source =Count("*") will give you are count. Name that as txtCount.
    A text box with control course =sum([value]) where value is the field you want to sum. Call this txtvalue. (If value is actually a calculated field, the calculation must be peformed in the query for the sum to work.)

    When these work OK, you can transfer the value to the main form/report.
    Put two new text boxes on the form/report.

    Set their control sources to excpressions like this

    =subformname.Form!txtCount
    =subformname.Form!txtValue

    When it is working OK you can hide the two controls in the footer if you want.

    Where subformname is the name of the subform or subreport control on the main form/report.
    Regards
    John



  3. The Following User Says Thank You to johnhutchison For This Useful Post:

    bobski (2011-09-23)

  4. #3
    Lounger
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks John

    It was a subform on a subform.

    regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •