query top 10 records

S

sg

Hi,

I'm trying to create a query to only show top 10 sales account information
sorted by sales descendingly.
account, name, sales.
How can I do this? I tried having count("account")=10 , it doesn't work.

Thanks in advance,
Sarah
 
B

Brian

sg said:
Hi,

I'm trying to create a query to only show top 10 sales account information
sorted by sales descendingly.
account, name, sales.
How can I do this? I tried having count("account")=10 , it doesn't work.

Thanks in advance,
Sarah

SELECT TOP 10 ......
 
S

sg

Hi Brian,

That works, thanks so much. By the way, is it possible for user to set
number of records? like replace 10 to a variable?

Thanks,
sarah
 
J

John Spencer (MVP)

No, that is not possible.

You would need to build the query in VBA to do this.

Well, I guess I should say, As Far As I Know it is not possible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top