Results 1 to 4 of 4

Thread: Top 5 Records

  1. #1
    Join Date
    Mar 2009
    Posts
    120

    Unanswered: Top 5 Records

    Hi,
    I have a somewhat large db working. I have a big report that I have a sub report on. I need to make another sub report that only shows the top 5 records based on a Count.

    The Fields i have in my query are:

    ADR Date
    DRG
    DRG (Count)
    Sum of $ field.

    I am trying to get the Top 5 of the Count by the ADR Date and when I select 10 in the Return box I only get 10 for the first date in my DB.

    Is there a way to Return the Top 5 with the Highest Counts by the ADR Date?

    I've attached the Results of the Query in total along with the Query Design View. THe Highlighted ones would be the results I would want to get for each of the Dates.
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    Select top 5
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Mar 2009
    Posts
    120
    Where do I select Top 5 at?

    I worked around it for now. The control on the Sub Report I locked so it doesn't grow and sized it to only show the Top 5 Records. The report is sorted Decending by Count.

  4. #4
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    In the recordsource of the report
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Posting Permissions

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