All,
I am trying to get records using a query/recordset in a module for Access 97 and need to get everything that is less than 7 years old from the date it's run.
Since I was not able to get it to by getting the actual number of days in the past 7 years, I guessed at the days. But as most can figure out, it's not very accurate and some records get through.
This is what I had in my where clause:
DateDiff(""d"", [Date into OD], Date()) < 2555
What can I replace the 2555 with that will give me the exact number of days going back 7 years to the day?
Thanks,
Mark
I am trying to get records using a query/recordset in a module for Access 97 and need to get everything that is less than 7 years old from the date it's run.
Since I was not able to get it to by getting the actual number of days in the past 7 years, I guessed at the days. But as most can figure out, it's not very accurate and some records get through.
This is what I had in my where clause:
DateDiff(""d"", [Date into OD], Date()) < 2555
What can I replace the 2555 with that will give me the exact number of days going back 7 years to the day?
Thanks,
Mark