Query to count items in a table with same part number

pds8475

Registered User.
Local time
Today, 11:09
Joined
Apr 26, 2015
Messages
84
Hi

I have a Table called DueInTable. This holds a list of items on a order that are due in. Each order has a unique identifier called ATRNumber. What I want to do is create a query that counts the number of Items on the order with the same part number() on the selected order and the output of the query(which is to be displayed in a subform) needs to look some thing like my example below.

selected order 123

Model partnumber quantity
optipoint 500 eco 123456 10
optipoint 500 adv 654321 5
Samsung ds-5007s 110111 2

total 17


any help would be appreciated
 
hmmm for some reason this website is deleting the spaces in my example but it should show the model description under the model heading, the part number under the part number heading and the quantity of each under the quantity heading
 
create an aggregate query:
select [model description],[part number], sum([quantity]) from DueInTable
Where [ATRNumber] = Forms!yourFormName![yourOrderNumberTextBoxControlName]
Group By [model description],[part number]
 
That gets me a count of the individual part numbers. But I also need a total items as well.

So say

item1 10
item2 5
item 3

total items 18
 

Users who are viewing this thread

Back
Top Bottom