Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Location
    Aberdeen, Scotland, UK
    Posts
    168

    Unanswered: Referring to Sub reports

    Does anyone know how to total a control on a sub form. I can't seem to refer to it.

    I tried

    =sum(child23.text20)
    and
    =sum(reports![RptPurchaseOrders]![RptOrderItemsSubReport].report.text20)

    and loads of others. Anyone know the answer??

    The parent report is called = RptPurchaseOrders
    Subreport is called = RptOrderItemsSubReport
    The subreport field is called = text20
    the subreport object on the parent report is called = Child23

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Exclamation You mean a report?

    Do you mean a report not a sub form?

    If a report, is this a group on the report?

    =sum([text20])

    Is that going on the group footer?

    PS Ya nearly got 3 stars now John!
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  3. #3
    Join Date
    Jan 2003
    Location
    Aberdeen, Scotland, UK
    Posts
    168
    Hoorahhh 3 Stars.....

    Anyway..

    Yes sorry I mean reports all the way through.

    I can't even get the sum function to work. It's just saying error. WHY WHY WHY...

  4. #4
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb Why Why Why

    Delilah...etc

    1 Is the report based on a table or query.

    2 What field names are on the report

    3 What grouping is set up and what group headers

    4 What are you trying to total and where on the report

  5. #5
    Join Date
    Jan 2003
    Location
    Aberdeen, Scotland, UK
    Posts
    168

    I got it...eventually

    I am an idiot. I was trying to =sum() on the page footer and not the report footer.

    I still can't refer to a field on a subform but I just put the totals on the actual subform.

    I'd still be curious to know how.

    It's easy the other way round: =parent.fieldname

    but you unfortunately don't seem to be able to write =ChildName.Fieldname

    Weird.

    Thanks for your quick reponse though.

    John

Posting Permissions

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