Results 1 to 2 of 2
  1. #1
    djpatjames is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    1

    Query to return records from each of several designations

    I've created a database that combines 2 spreadsheets with 1.3 million entries each. Within these sheets are entries with several "office code" designations. What I'm trying to create, is a query that will give me 10 to 20 records from each "office code".



    Can some one provide me with what to enter as criteria to return several records from each of the office codes?

    Let me know if you need more information.

    Thank you!

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You will need a query with a subquery similar to what Allen Brown shows here on his website. Look for the heading: TOP n records per group.

    I'm not sure how you will work both tables (spreadsheets) into a solution. I would recommend trying the subquery with just one table initially.

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

Similar Threads

  1. query doesn't return anything for some records
    By dylan_dog in forum Queries
    Replies: 3
    Last Post: 02-08-2012, 09:55 PM
  2. Replies: 1
    Last Post: 07-10-2011, 11:20 PM
  3. Return all records from Query
    By ysrini in forum Queries
    Replies: 1
    Last Post: 01-15-2010, 09:52 PM
  4. Replies: 0
    Last Post: 08-04-2009, 08:51 PM
  5. Return records not updated by update query
    By ars80 in forum Queries
    Replies: 2
    Last Post: 05-01-2006, 09:23 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