Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Melbourne, Victoria, Australia
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Show 'x of y' in report. (Access 2002 SR-1)

    I have a table which contains
    Name, Surname
    Fred, Smith
    John, Smith
    Joan, Smith

    When I display these on a report I want to also show
    Name, Surname
    Fred, Smith, 1 of 3
    John, Smith, 2 of 3
    Joan, Smith, 3 of 3

    As the number of 'Smith' increases/decreases I want
    that reflected in the 'x of y'.

    Any help appreciated.
    Regards
    Michael

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

    Re: Show 'x of y' in report. (Access 2002 SR-1)

    Group the report by surname (i.e. enter Surname in the Sorting and Grouping window, and set Group Header to Yes.)
    Put a text box txtGroupCount in the group header section, with Control Source =Count(*). This text box may be hidden.
    Put a text box txtRunningCount in the detail section, with Control Source =1 and Running Sum set to Over Groups. This text box may be hidden too.
    Put a text box in the detail section with Control Source =[txtRunningCount] &" of " & [txtGroupCount]

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Melbourne, Victoria, Australia
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show 'x of y' in report. (Access 2002 SR-1)

    Thanks for the quick response.
    It looks easy, once a solution is described.
    Regards
    Michael

Posting Permissions

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