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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top Values Property For Access Query

Status
Not open for further replies.

BOBAIAM

Programmer
Aug 8, 2002
4
US
I have an Access 2000 query which I only want to show the 10 ten values for entries within a subgroup (not the entire report) Does anyone know how to show these top values? I have set the top values property on the query sheet, but the results of the query are the top ten results for all records.

Thanks,
Bob
 
Bob:

From Access Help

Dim strGetSQL As String
strGetSQL = "SELECT TOP 10 Products.[ProductName] " _
& "AS TenMostExpensiveProducts, Products.UnitPrice FROM Products " _
& "ORDER BY Products.[UnitPrice] DESC;"
Me.RecordSource = strGetSQL

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top