Hi the prob;em starts with the Addnew ordre & details form.
I have looked at the sql for my queries
AddNewrderForm
SELECT Orders.CustomerID, Orders.OrderDate, Orders.PurchaseOrderNumber, Orders.ShippingMethodID, Customers.VATTaxRate AS Expr1, OrderDetails.OrderID, OrderDetails.ProductID, OrderDetails.Quantity, Products.UnitPrice AS Expr2, [OrderDetails].Discount AS Expr3
FROM (Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID) INNER JOIN (Products INNER JOIN OrderDetails ON Products.productID = OrderDetails.ProductID) ON Orders.OrderID = OrderDetails.OrderID;
for the price query sql reads: SELECT Price.ProductID, Price.Price
FROM Price;
TotalPriceOfOrderDetails sql reads
SELECT OrderDetails.OrderID, Customers.CompanyName, Products.productID, Products.UnitPrice AS Expr1, OrderDetails.Quantity, CCur(IIf([Quantity]=0,1,[Quantity])*[UnitPrice]) AS SubTotal, OrderDetails.Discount AS Expr2, CCur([SubTotal]-[Discount]) AS [SubTotal With Discount], Customers.VATTaxRate AS Expr3, CCur([SubTotal With Discount]*(1+[VatTaxRate])) AS [Total Price], Customers.CustomerID
FROM (Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID) INNER JOIN (Products INNER JOIN OrderDetails ON Products.productID = OrderDetails.ProductID) ON Orders.OrderID = OrderDetails.OrderID
ORDER BY OrderDetails.OrderID;
Total Price of order sql: SELECT [Total Price of Order Details].OrderID, [Total Price of Order Details].CompanyName, Sum([Total Price of Order Details].SubTotal) AS [Order SubTotal], Sum([Total Price of Order Details].[Total Price]) AS [SumOfTotal Price], [Total Price of Order Details].CustomerID
FROM [Total Price of Order Details]
GROUP BY [Total Price of Order Details].OrderID, [Total Price of Order Details].CompanyName, [Total Price of Order Details].CustomerID
ORDER BY [Total Price of Order Details].CompanyName;
There ar more queries but theres a large cumk here.
Thanks
Mark
Enter your message below
Sign in or Join us (it's free).