Before you read my question, I would advise you to visit the Image-Link.
The image-link shows 4Tables - its field, Primary, Foreign Keys, Relationships. The bottom of the Image, it is a Query (TransQ).
My question,
I am using a listbox to preview the following Count Code:
Expand|Select|Wrap|Line Numbers
- Me.listDetailsBox.RowSource = "SELECT ItemID, Count(TransQty) AS QtySold FROM TransQ GROUP BY ItemID ORDER BY Count(TransQty) DESC"
Expand|Select|Wrap|Line Numbers
- ItemID Qty Unit$ Total$
- Item200 2 $1 $2
- Item200 1 $1 $1
- Item200 5 $1 $5
Expand|Select|Wrap|Line Numbers
- ItemID Count(TransQty)
- Item200 3
The output should be
Expand|Select|Wrap|Line Numbers
- ItemID Count(TransQty)
- Item200 8