Results 1 to 4 of 4
  1. #1
    Radtastic10 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    65

    Display First N records


    I have a query where I only need to display the 5 or 10 latest records. I haven't been able to find anything that works.

    I have the results displaying in descending order which is helpful and will suffice, but don't really need all the additional information. I would just like to display just the amount of records that we decide is best for us.

    Not sure how to set up the query either in design view or the actual SQL in order to get the desired result.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    SELECT TOP 5 Field1...
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Radtastic10 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    65
    Just so I make sure I understand this correctly:

    SELECT TOP 5 table1.[field1]
    FROM table1
    ORDER BY table1.[field1] DESC;

    Is that the correct code?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    That is syntactically correct, yes.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 8
    Last Post: 05-10-2015, 06:24 PM
  2. What is the best way to display my records?
    By DesignGuy in forum Access
    Replies: 1
    Last Post: 03-30-2012, 03:40 PM
  3. query won't display records with no related records
    By James Brazill in forum Queries
    Replies: 1
    Last Post: 06-28-2011, 02:10 AM
  4. Replies: 7
    Last Post: 10-20-2010, 04:08 PM
  5. Display last five records only
    By premdasp in forum Queries
    Replies: 3
    Last Post: 11-18-2009, 11:53 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