Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Podder is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    22
    Quote Originally Posted by Ajax View Post
    From the OP’s comments they don’t care which records are returned, so long as there are only 10. In the initial post they would drop the 11th record. If the data happened to have records 10 and 11 with the same value, either one would do, so no logic to follow, no rule to apply

    So adding an additional order by and reversing the order of selection should do the job

    Select top 10 sales,id
    From mytable
    Order by sales,Id
    Ajax,
    Thanks, that worked perfectly.

  2. #17
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,446
    Glad to help

    I'll just point out that took 16 posts and a lot of peoples time, all because you didn't provide the information requested. For the future when you are asking about something, provide the required information - typically example source data, the query sql and the required outcome. Your first post did not provide any of this, your third alluded to there might be another field (in fact there were two), but not clear whether you were using it. In short, don't describe your data/problem, show it.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 09-14-2020, 11:55 AM
  2. Macro Loop values in Form ang get values to query
    By mauryc1990 in forum Programming
    Replies: 13
    Last Post: 12-22-2017, 08:30 AM
  3. Replies: 3
    Last Post: 10-30-2016, 05:50 AM
  4. Change Table Index Values Based on query Values
    By thuzkee02 in forum Import/Export Data
    Replies: 2
    Last Post: 11-24-2015, 11:45 PM
  5. Replies: 15
    Last Post: 10-18-2015, 04:05 PM

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