Query current fiscal year

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

How should I write criteria in my query to only return records where the MyFY
field includes a date between the current fiscal year? For example, if my
fiscal year is October 1 - September 30, I'd like to return all records
during that current fiscal year. Thanks for your help.
 
In the QBE window, select the *, and slect the MyFY field,check off the
show box, because you are using it as a criteria and it is alreaddy
included in the * , anyway. In the criteria, type between #StartOfFY#
and #EndOfFY#, where StartOfFY and EndOfFY should be in a recognizable
date format such as #07-01-2008# and #06-30-2009# or #7/1/2008# and
#6/30/2009#


Alternatively, in SQL:

SELECT *
FROM MyTable
Where MyFY BETWEEN #7/1/2008# and #6/30/2009#


Ben
 
Add a calculated field like this --
AdjustMyFY: Year(DateAdd("m", 3, [MyFY]))

and use this as criteria ---
Year(Date())
 
Back
Top