Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Feb 2002
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Running Sum in Group Header (Access 2000)

    Hello:
    I want to include a field in a report's group header section. This field will display the number of the last record on the current page. It's similar to the "Page of Pages" field in the page footer section except in will display " Name # of #'s."

    My question is how do I do this in the group header section?

    Thank you,
    Doug

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Running Sum in Group Header (Access 2000)

    I'm not 100 % certain, but I don't think this can be done. The group header is formatted before the last record on the page has been formatted, so the number of the last record is not yet available.

    See ACC2000: Displaying First and Last Record Per Page in Page Footer for something similar that you can do.

  3. #3
    Star Lounger
    Join Date
    Feb 2002
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Running Sum in Group Header (Access 2000)

    Hans:
    Can't I add a text box to the detail section named "Increment" and in the control source line enter " =1" then allow this to advance 1 for each record. Then in the group header section add a text box that references the "Increment" text box?

    I have a text box in the header now that shows the total number of names in that particular group. So it's looking forward to the total number of names in that section and then displaying them in the group header.

    It seems to me that I've done this before, but I can't remember the exact procedure to reference that "counter" text box nor can I remember how I made the counter box itself.

    Doug

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Running Sum in Group Header (Access 2000)

    You can put a "counter" in the detail section: a text box with Control Source =1 and Running Sum set to Over All or Over Groups, depending on whether you want to restart the counter for each group.

    If you put such a text box in the detail section and create another text box in the group header that refers to it, that one will show the value for the first record in the group, not for the last record on the page. Even if you put a text box in the page footer that refers to the text box in the detail section, and a text box in the group footer that refers to the text box in the page footer, it will still display the value for the first record in the group.

  5. #5
    Star Lounger
    Join Date
    Feb 2002
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Running Sum in Group Header (Access 2000)

    Hans:
    Yeah, that's what I continue to run into. My text box in the group header shows "1" on each page. Like " 1 of 215 names" on every page.

    Text box in the page footer call it "Counter" with control source count(last), have it not running sum and then make the page footer height "0". Where "last" is the last name field.

    Reference this "Counter" in the group header text box. like ="Number " & Counter & "of: " & Count(first) "names in section" Division

    What about that?

    Doug

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Running Sum in Group Header (Access 2000)

    I don't think that will do what you wanted.

  7. #7
    Star Lounger
    Join Date
    Feb 2002
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Running Sum in Group Header (Access 2000)

    Yes, I see that.

    I'm sure there's a way to count the number of rows on each page and return that number to a text box elsewhere on the report. It seems as if I've done it before or read somewhere how to do it.

    I'm going to keep looking around and see if I can find what I seem to remember reading.

    Thank you,
    Doug

Posting Permissions

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