All; using access 2010. I have a payroll table that keeps data for up to five years. I am trying to get a query of the last twelve months of payroll data. I am using the code in the criteria:
Code:
>= DateAdd("yyyy", -1, Date())
It returns only 11 months:
Code:
qryPayroll |
P Num |
P State |
SDate |
435 |
NC |
4/1/2015 |
435 |
NC |
5/1/2015 |
435 |
NC |
6/1/2015 |
435 |
NC |
7/1/2015 |
435 |
NC |
8/1/2015 |
435 |
NC |
9/1/2015 |
435 |
NC |
10/1/2015 |
435 |
NC |
11/1/2015 |
435 |
NC |
12/1/2015 |
435 |
NC |
1/1/2016 |
435 |
NC |
2/1/2016 |
I am missing March 2015 (3/1/2015). Is it because we're in that month? I want to include March 2015 to get a full 12 months since the data only updates on a monthly basis; so March 2016 would not be included yet. What changes to the code do I need pls?
Thanks