Hi,
I have a query that the user puts in the start and end date for the month they want the report on the main menu form. The query then pulls data for the month they entered plus the two prior months so they see a trend.
I have the following funtion in my query for the date:
I think the Year(Now(()) is messing things up because there is nothing in there for 2015. How do I modify the function so that if the user puts in 12/1/2014 to 12/31/2014 and we are on 1/5/2015 that it will pull October 2014, November 2014 and December 2014 data?
TIA
I have a query that the user puts in the start and end date for the month they want the report on the main menu form. The query then pulls data for the month they entered plus the two prior months so they see a trend.
I have the following funtion in my query for the date:
Code:
Between DateSerial(Year(Now()),Month([Forms]![Main Menu]![StartDate])-2,Day([Forms]![Main Menu]![StartDate])) And [Forms]![Main Menu]![EndDate]
I think the Year(Now(()) is messing things up because there is nothing in there for 2015. How do I modify the function so that if the user puts in 12/1/2014 to 12/31/2014 and we are on 1/5/2015 that it will pull October 2014, November 2014 and December 2014 data?
TIA