i have 2 tables. tblOrders and tblOrdersItems. tblOrdersItems is the child and tbl Orders is the parent. the linking field is OrderID.
i am wanting to count all the OrderID in tblOrders. the criteria i need is EmployeeListID which is stored in tblOrdersItems.
when i put these tables into query design, add the criteria, grouping(see below)
i get (record count at bottom of query screen) 87 records. then i add a field to give me the count so i can then use it i get many more.
im hoping someone can get the count working. i have uploaded the relevant tbl and my attempted query.
thanks
i am wanting to count all the OrderID in tblOrders. the criteria i need is EmployeeListID which is stored in tblOrdersItems.
when i put these tables into query design, add the criteria, grouping(see below)
Code:
SELECT tblOrders.OrderID
FROM tblEmployeeList INNER JOIN (tblOrders INNER JOIN tblOrdersItems ON tblOrders.OrderID = tblOrdersItems.OrderID) ON tblEmployeeList.EmployeeListID = tblOrdersItems.Employee
WHERE (((tblOrders.OrderDate)>Date()) AND ((tblEmployeeList.EmployeeListID)=[Forms]![rptReportsMainScreen]![txtEmployees]))
GROUP BY tblOrders.OrderID;
i get (record count at bottom of query screen) 87 records. then i add a field to give me the count so i can then use it i get many more.
im hoping someone can get the count working. i have uploaded the relevant tbl and my attempted query.
thanks