Results 1 to 2 of 2
  1. #1
    babak is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    1

    Top N items per group

    I want the top 3 "Downtime" for each "Line". The table is called "Top 3 Downtime" and I put this in the criteria of Downtime.

    In (Select Top 3 [Downtime] From [Top 3 DownTime] Where
    [Line]=[Top 3 DownTime].[Line] Order By [Downtime] Desc)

    For some reason, this is only returning the top 3 "Downtime" without taking line into consideration. Does anyone know what is wrong with the code?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Trying to group items on a Crosstab Report
    By Nick Lingenfelter in forum Reports
    Replies: 2
    Last Post: 02-27-2013, 07:08 AM
  2. Replies: 0
    Last Post: 02-25-2013, 04:43 PM
  3. Replies: 1
    Last Post: 10-22-2012, 08:04 AM
  4. Replies: 2
    Last Post: 06-21-2012, 07:40 PM
  5. Items With Which items Most Commonly
    By vansicklej in forum Access
    Replies: 3
    Last Post: 08-10-2011, 11:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums