I have queries that are done by date range.. Below is my case statement to set the criteria... I need it to be checking for the current 30 days, current 90 , current 6 months & year. The problem im getting is it shows all the shipments when i select "30 days" all shipments are greater then that.. i need to have anything that is in the range 30 days - current / 90 - current etc.
Case "Current 30 Days": SqlAge = "(((ExpBooking.[DateOfDeparture]) > Date() - 30))"
Case "Current 90 Days": SqlAge = "(((ExpBooking.[DateOfDeparture]) > Date() - 90))"
Case "Current 6 Months": SqlAge = "(((ExpBooking.[DateOfDeparture]) > Date() - 183))"
Case "Current Year": SqlAge = "(((ExpBooking.[DateOfDeparture]) > Date() - 365))"
Case "All Shipments": SqlAge = "(((ExpBooking.[DateOfDeparture]) <> Date()-0))"
Case "Current 30 Days": SqlAge = "(((ExpBooking.[DateOfDeparture]) > Date() - 30))"
Case "Current 90 Days": SqlAge = "(((ExpBooking.[DateOfDeparture]) > Date() - 90))"
Case "Current 6 Months": SqlAge = "(((ExpBooking.[DateOfDeparture]) > Date() - 183))"
Case "Current Year": SqlAge = "(((ExpBooking.[DateOfDeparture]) > Date() - 365))"
Case "All Shipments": SqlAge = "(((ExpBooking.[DateOfDeparture]) <> Date()-0))"