Solved

Autonumber undoes sort in Access 2003 table

Posted on 2007-04-04
3
208 Views
Last Modified: 2008-02-01
In Access 2003, I sort my table by product count such as 100 apple, 50 bananas, etc, I want to list my products by the most stock on hand first, I want to add a field that will count the rows. When I add an autonumber field and make it the primary key field, it undoes my product count field sort and makes the products with the least stock on hand first, rather than the way I had it. Is there some way to count the rows w/o undoing my sort?
0
Comment
Question by:contrain
  • 2
3 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 18852209
SELECT a.Fruit, (Select Count(b.Fruit) FROM myTable AS b WHERE b.Fruit=a.fruit ) AS Ctr
FROM myTable AS a;
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 18852230

SELECT a.Fruit, (Select Count(b.Fruit) FROM myTable AS b WHERE b.Fruit=a.fruit ) AS Ctr
FROM myTable AS a
GROUP BY a.Fruit;
0
 

Author Comment

by:contrain
ID: 18852266
Thanks,
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now