Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Page numbers for group (Access 2000 all updates)

    Is there a way to show the page numbers for a group, and also show the total pages for the report?

    I can get the page numbers for a group by resetting the Page #, but that eliminates the possibility of still keeping track of the total pages.

    For example, this would be what is wanted...
    page 1 (of report)
    page 1 of 2 (for group)
    page 2 of 2 (for group)
    page 2 (of report)
    page 1 of 2 (for group)
    page 2 of 2 (for group)
    page 3 (of report)
    page 1 of 1 (for group)

    Thanks.

    Tom

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Page numbers for group (Access 2000 all updates)

    You should be able to do it with VBA code in the same place where you reset the page number for the group - you would need to define a global variable that stores the total page number, and then stick the sum of that and the current page count into the control that prints the total page count.
    Wendell

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page numbers for group (Access 2000 all updates)

    I found an MVPS website that might help on this subject:

    http://www.mvps.org/access/reports/rpt0013.htm

    Good Luck!
    NMP
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  4. #4
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page numbers for group (Access 2000 all updates)

    Wendell
    Thanks for your suggestion. I think this might work, but I can't seem to hold my head at the proper angle to get the code right.

    Can you give me an example of how you might store the current number of pages for the group?

    Thanks.

    Tom

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

    Re: Page numbers for group (Access 2000 all updates)

    Tom,

    I have attached an example based on tables from the Northwind database. The code behind the report is a variation on the code from the site referred to by teachesms. On the first pass through the report, two arrays are filled, on the second pass, these are used to set the text for a text box.

  6. #6
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page numbers for group (Access 2000 all updates)

    Hans
    Thanks.

    I adapted it and it works like a charm. I had fooled around with that code but couldn't get it quite right.

    Thanks again.

    Tom

Posting Permissions

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