Limiting records returned in a query

  • Thread starter Thread starter Gonzosez
  • Start date Start date
G

Gonzosez

I have a query that is called by 2 different reports.
1. is a dataview and all records are required.
2. is a graph only 10 records are required.
How can I limit the records returned to 10?
Thanks
 
You will need two queries. In query for the graph, change the query's SQL
from Select to Select TOP 10. For TOP to work, the query must be sorting the
records in descending order. Also if there is a tie for the 10th position,
Access will return more than 10 records.

If you don't know how to change the SQL, right click in the QBE table area
and go to Properties. Change Top Values to 10.
 
Back
Top