I created a query to calculate and summarize total line item cost, and total order cost by order for each customer.
SELECT tblCustomers.CustName, tblOrders.OrderID, tblOrders.OrderDate, Sum(tblOrderDetails.[Quantity]*[SoldAsPrice]) AS LineTotal, tblOrders.OrderShippingAmt, [LineTotal]+[OrderShippingAmt] AS OrderTotal
FROM (tblCustomers INNER JOIN tblOrders ON tblCustomers.CustID = tblOrders.LkupOrderCustID) INNER JOIN tblOrderDetails ON tblOrders.OrderID = tblOrderDetails.fkOrderID
GROUP BY tblCustomers.CustName, tblOrders.OrderID, tblOrders.OrderDate, tblOrders.OrderShippingAmt, [LineTotal]+[OrderShippingAmt]
ORDER BY tblOrders.OrderID;
When I run the query, I get the following error, but when I click OK, the query still runs, and the results are as expected. I have done the preliminary review of the expressions, but I can't find a problem.
PS., thank you to everyone who has pointed out that I can calculate totals in queries, rather than saving them to tables, I just need to get over this hurdle.