Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2003
    Posts
    122

    Unanswered: Groups of 20 on a report

    I am trying to create a report that will take a recordset of 1,000 names and display them in groups of 20. I am hoping to have 4 columns of 20 names each, displayed on one sheet of 8 1/2 x 11 paper. Thanks in advance for any assistance.

  2. #2
    Join Date
    Feb 2004
    Posts
    214

    ...

    1,000 names in groups of 20, would be 50 groups.
    I don't know how you would fit 50 groups of 20 on 1 page?
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  3. #3
    Join Date
    Feb 2004
    Posts
    214

    ...

    Also, this may help.
    If you want to split them into groups of 20 names per group.

    Create an autonum column in your list of names.
    Then in a query [autonumber] mod 20
    This will number the records 0-19 and then start over again.
    You can now group all of your 0's, 1's , 2's etc...
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  4. #4
    Join Date
    Sep 2003
    Posts
    122
    It would be 4 groups of twenty per page. Sorry for the confusion.

  5. #5
    Join Date
    Feb 2004
    Posts
    214

    ...

    see if the above helps for the grouping part.
    Getting how many you want per page would probably be a matter of formatting.
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  6. #6
    Join Date
    Sep 2003
    Posts
    122
    It is an idea I did not think of, however, I would like to retain my current sort order, which is by date. I do agree, once I figure out how to get the grouping done, the rest is a matter of formatting. I just cannot figure out how to get the grouping done. Thanks for posting. I appreciate the assistance.

  7. #7
    Join Date
    Feb 2004
    Posts
    214

    ...

    So you want the lowest 20 to be group 1, the next lowest group to be group 2 etc...?

    You can add a field called group #
    Then make a top 20 query that shows the top 20 sorted by whatever you want. Them make an update query from that top 20 query and update the group number in sequential order.

    Will that work?
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  8. #8
    Join Date
    Sep 2003
    Posts
    122
    Blonde:

    Going back to your original idea...is it possible to setup a stored procedure to pull my recordset, but then add a column (not stored in a table) that autonumbers based on the number of records. I would like to avoid storing these numbers as well as having to run update queries. I am using Access 2000 with a SQL Server 2000 backend. Thanks for your continued assistance.

  9. #9
    Join Date
    Feb 2004
    Posts
    214

    ...

    I am having difficulty finding anything on adding an autonumber in a query. Without modifying your table, you can append the table to a local Access table. In that local table, you can set up an autonumber. This is the best way that I can think of right now. If I find a better way, I will post it here.
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Add an Autonumber??? ... good grief that has to be the hardest possible way doesn't it?

    Have a look at Grouping options and Group Interval. I think that may be the easiest way to do it.

    If not, in the report's Detail section, you can set up code in the On Print (or On Format) just set up a variable to count the number of times the detail section has been printed, and when that variable Mod 20 is zero, make a line or control visible. Not as easy as grouping interval setup, but it's still nowhere near as hard as trying to add an autonumber!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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