A
Alex
I need to show records according to fiscal year the 4 last
years and for the 4 last months.
The fiscal year is from Aug 1 to Jul 31.
I'm using the following to choose years:
In the query design in the Field:
Year(DateAdd("m",+5,[Day]))
in the Criteria: Format$(Date(),"yyyy")-4 for the last 4th
year and in other queries -3, -2, -1.
To get a month I'm using two columns:
1st. In the Field: Format([Day],"yyyy") and in Criteria:
Format$(Date(),"yyyy") - to take the current year
2d. In the Field: Format([Day],"mm") and in the Criteria:
Format$(DateAdd("m",-4,Date()),"mm") to take the last 4th
month (the rest of months -3, -2, -1).
Everything is working except the queries is very slow.
Using straightforward >=#8/1/2002# And <=#7/31/2003#
makes it much more faster but I'd like to have it flexible.
Could anybody advise anything?
Thanks
years and for the 4 last months.
The fiscal year is from Aug 1 to Jul 31.
I'm using the following to choose years:
In the query design in the Field:
Year(DateAdd("m",+5,[Day]))
in the Criteria: Format$(Date(),"yyyy")-4 for the last 4th
year and in other queries -3, -2, -1.
To get a month I'm using two columns:
1st. In the Field: Format([Day],"yyyy") and in Criteria:
Format$(Date(),"yyyy") - to take the current year
2d. In the Field: Format([Day],"mm") and in the Criteria:
Format$(DateAdd("m",-4,Date()),"mm") to take the last 4th
month (the rest of months -3, -2, -1).
Everything is working except the queries is very slow.
Using straightforward >=#8/1/2002# And <=#7/31/2003#
makes it much more faster but I'd like to have it flexible.
Could anybody advise anything?
Thanks