Results 1 to 4 of 4
  1. #1
    fanfan2 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    5

    query group by


    I have the attached table, I would like to group by ID and if there are consecutively same codes, group by codes, then pick the minimum valueA and maximun valueB within the group. I couldn't make it work, because if I group by ID and then group by code, then it picks all the same codes within the ID (not just the consecutive ones). Any help would be appreciated.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    i tell you what would be of tremendous help to me in order to help you would be if you provided a result table of what exactly you want the outcome to look like, if the query was run on the table you've already uploaded here. if you do that, it would easier to tell you if it is possible in 1 qry, or if you would need 2. most likely you will need 2 anyway

  3. #3
    fanfan2 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    5
    The tables are attached. one is the original table, the other is the result table I would like to have. Thanks very much.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by fanfan2 View Post
    The tables are attached. one is the original table, the other is the result table I would like to have. Thanks very much.
    this will take a bit of thinking, and you will need a module to do it. if you're willing to pay for the time to figure it out, I'd do it for you. if not, you will need to research vba recordsets...

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

Similar Threads

  1. Group by
    By EstesExpress in forum Queries
    Replies: 0
    Last Post: 02-26-2010, 07:52 AM
  2. Replies: 2
    Last Post: 11-18-2009, 06:49 PM
  3. columns for group detail but not group header?
    By Coolpapabell in forum Reports
    Replies: 0
    Last Post: 08-21-2009, 08:53 AM
  4. Group By
    By SMAlvarez in forum Access
    Replies: 0
    Last Post: 10-28-2008, 04:40 PM
  5. Top 2 by group
    By griz in forum Access
    Replies: 0
    Last Post: 05-25-2008, 07:10 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