Simple query showing the number of results returned

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I'm an Access Newby so sorry for the simple question!

I have a list of stock items, and perform a query to list a certain type of
stock. I want to also list the number of items retrieved, I have been trying
to use COUNT([StockID]) but to no avail (I just get 1's returned!) I don't
use SQL (I just use the design view) but looking at the SQL view I have this:
SELECT Stock.StockID, Stock.StockItemName, Count(Stock.StockItemName) AS
CountOfStockItemName
FROM Stock
GROUP BY Stock.StockID, Stock.StockItemName
HAVING (((Stock.StockItemName)="Porsche"));
 
Assuming that StockID is a unique ID, if you want to list the totals of each
'StockItemName' then you should re-do your query without StockID.

If this answer doesn't make sense, maybe you could give us a little sample
of your data, and of the output your would like to get.

Cheers,

Chris.
 
Back
Top