Hello all,
Do any of you know the function/formula that will only query the last twelve months in an Access query? Based on the current month.
Thanks.
Hello all,
Do any of you know the function/formula that will only query the last twelve months in an Access query? Based on the current month.
Thanks.
BrownBoy
If happy, mark "SOVLED" & add to "REP"
You could use this criteria.
[DateField]>=DateAdd("yyyy", -1, Date()) And [DateField]<=Date()
If posting code please use code tags, see here.
Thanks for the quick reply. The answer I get now is either "-1" or "0". Any ideas on what happened?
Got it, stupid mistake. Didn't add it to the criteria, I added it to the field. Stupid.
Thanks.
Glad you got it.
By the way, I'm not 100% sure I posted the exact criteria you want but the function DateAdd is what you need for this sort of thing.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks