Results 1 to 3 of 3
  1. #1
    alonalon is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2012
    Posts
    1

    How can I only take 10 rows at time, and not just the last or first 10.

    I hope I am posting this in the right forum.

    This is what I need:

    Lets say I have 100 rows in my DB, If I use "TOP 10" it will give me the first 10 rows, but lets say I want to get the second 10 row, of the 3rd 10 rows, how do I do that, I'd really appreciate if anyone could help me, thanks and have a great day.

  2. #2
    help_me_with_access is offline help_me_with_excel
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    262
    you can't do it with the program itself. it's impossible. you have to use its development environment. but say for instance, your records are numbered perfectly via an incremental autonumber. in that case, this sql would give you records 11-20:

    Code:
    select * from table where autonumber between 11 and 20
    but that's not practical because it never happens. hence, you need to code it.

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,740
    Try working with your table based on this sql which works fine in Access 2003.

    Code:
    SELECT TOP 2 tblIncidents.IncidentId as X
    FROM tblIncidents where IncidentId  Not in
    (SELECT TOP 1 tblIncidents.IncidentId as W
    FROM tblIncidents)
    I have a table with 3 records, this gives me items 2 and 3.

    First time use Top 10

    Second run do Top 10 (....Top 10....)

    Third do Top 10 (...Top 20....)


    The key to this in my view is the subquery

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

Similar Threads

  1. Replies: 1
    Last Post: 02-28-2012, 09:16 PM
  2. Replies: 0
    Last Post: 02-09-2012, 05:43 PM
  3. Time difference between rows
    By GeirA in forum Access
    Replies: 4
    Last Post: 11-24-2011, 02:05 PM
  4. Replies: 2
    Last Post: 08-28-2011, 06:06 AM
  5. Replies: 4
    Last Post: 01-15-2010, 06:06 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