I have two tables:
Customer table:
CustomerId-CustomerName-OrdersTotal
Orders table:
ID-CustomerID-Product-Cost-
I want access to display the total number of orders on each customer Id found under the Order table.
Is there a way to do this?
I have two tables:
Customer table:
CustomerId-CustomerName-OrdersTotal
Orders table:
ID-CustomerID-Product-Cost-
I want access to display the total number of orders on each customer Id found under the Order table.
Is there a way to do this?
Create a totals query based on tblOrders and insert a count on the CustomerID field. If you need the customer name, you'll have to include the customer table, equal joining on CustomerID. If you've never created a Totals query, now's a good time to research it.
BTW, it is commonly considered poor practice to store calculated values, which is what your OrdersTotal suggests you're doing. Best to use forms/queries/reports to show totals.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
I was able to create a totals query with the customerID and OrdersTotal, but I cannot figure out how to populate the OrdersTotal field from the number of orders total from the query table.Create a totals query based on tblOrders and insert a count on the CustomerID field. If you need the customer name, you'll have to include the customer table, equal joining on CustomerID. If you've never created a Totals query, now's a good time to research it.
BTW, it is commonly considered poor practice to store calculated values, which is what your OrdersTotal suggests you're doing. Best to use forms/queries/reports to show totals.
Create an append or update query (whichever is required) and use the totals query as the query table source. Store these calculations at your own peril, I guess.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.