A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Find Top 10 items from a query



 
 
Thread Tools Display Modes
  #1  
Old July 21st, 2008, 03:42 PM posted to microsoft.public.access,microsoft.public.access.queries
Jasper Recto
external usenet poster
 
Posts: 257
Default Find Top 10 items from a query

I have a query that sorts items from table. I would like to only determine
and view the top items on that list.

Is that possible?

Thanks,
Jasper


  #2  
Old July 21st, 2008, 03:55 PM posted to microsoft.public.access.queries,microsoft.public.access
Dennis
external usenet poster
 
Posts: 1,222
Default Find Top 10 items from a query

SELECT TOP 10 ..... etc.

or put 10 in the drop down box that says All on the query menu toolbar if in
the query design view.

"Jasper Recto" wrote:

I have a query that sorts items from table. I would like to only determine
and view the top items on that list.

Is that possible?

Thanks,
Jasper



  #3  
Old July 21st, 2008, 04:09 PM posted to microsoft.public.access,microsoft.public.access.queries
Steve[_57_]
external usenet poster
 
Posts: 598
Default Find Top 10 items from a query

Open your query in design view and click in a blank area of the query window
(Where your table is at). Click on Properties. In the Properties dialog, set
the Top property to an appropriate value to get the top items in your query.

Steve


"Jasper Recto" wrote in message
...
I have a query that sorts items from table. I would like to only determine
and view the top items on that list.

Is that possible?

Thanks,
Jasper



  #4  
Old July 21st, 2008, 04:40 PM posted to microsoft.public.access.queries,microsoft.public.access
Dale Fye
external usenet poster
 
Posts: 2,651
Default Find Top 10 items from a query

Keep in mind that the Top predicate will return more values than you want if
the field in your Order By clause has duplicates at the cutoff point.

SELECT Top 2 * from your_Table ORDER BY [DOB] DESC

will return 3 people if the 2nd and 3rd person have have same DOB. To
preclude this, you can add another field to the Order By clause that is
unique.

--
HTH
Dale

Don't forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



"Jasper Recto" wrote:

I have a query that sorts items from table. I would like to only determine
and view the top items on that list.

Is that possible?

Thanks,
Jasper



  #5  
Old July 21st, 2008, 04:40 PM posted to microsoft.public.access,microsoft.public.access.queries
Jasper Recto
external usenet poster
 
Posts: 257
Default Find Top 10 items from a query

THANKS!!
"Steve" wrote in message
m...
Open your query in design view and click in a blank area of the query
window (Where your table is at). Click on Properties. In the Properties
dialog, set the Top property to an appropriate value to get the top items
in your query.

Steve


"Jasper Recto" wrote in message
...
I have a query that sorts items from table. I would like to only
determine and view the top items on that list.

Is that possible?

Thanks,
Jasper





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.