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

Command "=1" in Text Box

Status
Not open for further replies.

jenni

Technical User
May 12, 2000
21
US
When I create a Report which is in the form of a Hit list, I use the command "=1" to show the position of the data in the Hit list ( i.e. Hit list most damaged products: query sorts damages descending, report displays info with text box =1, which shows what damage has position nr. 1 or nr. 10, etc.)

My problem is this, if I wish to only see the top ten damages and damage ten and eleven occur both 2 times, I end up with a top 11 Hit list because Access doesn't seem to cut off the data at position 10 if the next data line has the same value.

Can I implement a similiar command like =1 in the query and in the critieria <=50? Theoretically, this would work, but the query doesn't accept this type of command. Or maybe there is another solution to this problem.

 
Hallo,

In SQL there is the TOP clause which limits the number of records returned from a SELECT.
i.e.
SELECT TOP 10 * FROM tblTable ORDER BY intSize;
would return the 10 largest entries.

- Frink
 
I have been using this Top feature, but the problem is that if I choose top 10, and the values in the 10th and 11th place are the same, the list returns Top 11.

For example:
Top 3 products sold
1. Boots 5
2. Shirts 4
3. Pants 2
4. Hats 2

Whenever the amount of the last position from my Top select the same value as the next position has, I don not get only the top 3, but 4,5,6, or sometimes more.

How can I get access to really cut off the list where I want it to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top