Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Only Display Top Twenty Items in a Report. 2

Status
Not open for further replies.

Sanibel

Technical User
Nov 15, 2001
73
GB
I have a table which contains the number of times that users have accessed a particular facility. I have produced a report via a query to list the total number of times that each user has accessed the facilty. This works fine, but over time the report is getting lengthy. Is there a way, within my query, that I can limit the report to just the top twenty users, or will I need to use VB?

Thanks
 
Change the SQL to something like:

select top 20
field1, field2, field3
from yourtable
order by field1

John
 
You can use Top in SQL. Choose Properties from the right-click menu in the Query Design Window.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top