Sales by Year

Access

PARAMETERS [Forms]![Sales by Year Dialog]![BeginningDate] DATETIME, [Forms]![Sales by Year Dialog]![EndingDate] DATETIME; SELECT Orders.ShippedDate, ,Orders.OrderID ,[Order Subtotals].Subtotal ,FORMAT([ShippedDate],"yyyy") AS [Year] FROM ORDERS INNER JOIN [ORDER SUBTOTALS] ON Orders.OrderID = [Order Subtotals].OrderID WHERE ( ( (Orders.ShippedDate) IS NOT NULL AND (Orders.ShippedDate) BETWEEN [Forms]![Sales by Year Dialog]![BeginningDate] AND [Forms]![Sales by Year Dialog]![EndingDate] ) )