Selasa, 29 Juli 2014

[MS_AccessPros] Re: Question RE my FY query

 

Your logic is backwards. It should be:

IIf([CalendarMonth]>6,[CalendarYear]+1,[CalendarYear]) AS FY

If the month is July the FY should be 1 greater that the calendar year. Hence, July 2008 would be July FY09. And June 2008 would be FY08.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
http://mvp.microsoft.com/en-us/mvp/Bill%20Mosca-35852
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com



---In MS_Access_Professionals@yahoogroups.com, <Sheryl.Jones@state.mn.us> wrote :

I created a query which is working wonderfully to execute data based on fy numbers, except that the FY that shows is 1 year off.  All of the data that should be coming out for FY 08 is showing up in the row for FY 07.  Can somebody take a look and tell me what the problem might be?


Our FY year runs from 7/01/07-06/30/08 etc.


SELECT sj_qry_first_referral_by_fy.Classification_Referral_Source, sj_qry_first_referral_by_fy.Board, sj_qry_first_referral_by_fy.Date_of_Referral, Month([Date_of_Referral]) AS CalendarMonth, Year([Date_of_Referral]) AS CalendarYear, IIf([CalendarMonth]<7,[CalendarYear]-1,[CalendarYear]) AS FY, sj_qry_first_referral_by_fy.CaseID

FROM sj_qry_first_referral_by_fy;


TIA
sheryl



 

__._,_.___

Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar