How can I create a query for a report in which I want the records of this year, from 1/1/2005 Until Now (Year to Date)? Let's say that I have the tables Customers And Orders and I want the orders Group by Customers Where Orders.Date Between #1/1/2005# And Now().
I have done sth. like this
SELECT Orders.OrderID, Orders.CustomerID, Orders.ShipCountry
FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID
WHERE (((Orders.OrderDate) Between #1/1/2005# And Now()))
GROUP BY Orders.OrderID, Orders.CustomerID, Orders.ShipCountry;
But I want it to be dynamic, so when we will have 2006 it will get automaticly only the records of 2006
I have done sth. like this
SELECT Orders.OrderID, Orders.CustomerID, Orders.ShipCountry
FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID
WHERE (((Orders.OrderDate) Between #1/1/2005# And Now()))
GROUP BY Orders.OrderID, Orders.CustomerID, Orders.ShipCountry;
But I want it to be dynamic, so when we will have 2006 it will get automaticly only the records of 2006