A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Criteria for results in report of previous year



 
 
Thread Tools Display Modes
  #1  
Old May 8th, 2009, 10:35 AM posted to microsoft.public.access
reterrig
external usenet poster
 
Posts: 27
Default Criteria for results in report of previous year

I have created an account file for a fiscal year that begins 1st July and
ends 30th June of the next Year.
I Need a report for each quarter separately. My Table “Accounts” has a
field “Accountsdate”. In the relevant query of the report “First Quarter” in
the Criteria of the field “Accountsdate” I have inserted
“[Accounts].AccountsDate Between 1/10 And 31/12”.
Report only shows the results of the dates between 1/10 and 31/12 but of the
present year.
I need the report to show results of the quarter of the previous year

  #2  
Old May 8th, 2009, 11:02 AM posted to microsoft.public.access
Kc-Mass
external usenet poster
 
Posts: 362
Default Criteria for results in report of previous year

Does your table not include a field with the FiscalYear??


"reterrig" wrote in message
...
I have created an account file for a fiscal year that begins 1st July and
ends 30th June of the next Year.
I Need a report for each quarter separately. My Table "Accounts" has a
field "Accountsdate". In the relevant query of the report "First Quarter"
in
the Criteria of the field "Accountsdate" I have inserted
"[Accounts].AccountsDate Between 1/10 And 31/12".
Report only shows the results of the dates between 1/10 and 31/12 but of
the
present year.
I need the report to show results of the quarter of the previous year



  #3  
Old May 8th, 2009, 11:09 AM posted to microsoft.public.access
reterrig
external usenet poster
 
Posts: 27
Default Criteria for results in report of previous year

My table includes only field with the Date/Time

"KC-Mass" wrote:

Does your table not include a field with the FiscalYear??


"reterrig" wrote in message
...
I have created an account file for a fiscal year that begins 1st July and
ends 30th June of the next Year.
I Need a report for each quarter separately. My Table "Accounts" has a
field "Accountsdate". In the relevant query of the report "First Quarter"
in
the Criteria of the field "Accountsdate" I have inserted
"[Accounts].AccountsDate Between 1/10 And 31/12".
Report only shows the results of the dates between 1/10 and 31/12 but of
the
present year.
I need the report to show results of the quarter of the previous year




  #4  
Old May 8th, 2009, 12:45 PM posted to microsoft.public.access
Kc-Mass
external usenet poster
 
Posts: 362
Default Criteria for results in report of previous year

If it is a date/Time field then I assume it contains the year so if you want
the data for the second quarter of FY 07 then look for dates Between
#1/10/07# and #31/12/08#




"reterrig" wrote in message
...
My table includes only field with the Date/Time

"KC-Mass" wrote:

Does your table not include a field with the FiscalYear??


"reterrig" wrote in message
...
I have created an account file for a fiscal year that begins 1st July
and
ends 30th June of the next Year.
I Need a report for each quarter separately. My Table "Accounts" has a
field "Accountsdate". In the relevant query of the report "First
Quarter"
in
the Criteria of the field "Accountsdate" I have inserted
"[Accounts].AccountsDate Between 1/10 And 31/12".
Report only shows the results of the dates between 1/10 and 31/12 but
of
the
present year.
I need the report to show results of the quarter of the previous year






  #5  
Old May 8th, 2009, 05:34 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Criteria for results in report of previous year

On Fri, 8 May 2009 02:35:01 -0700, reterrig
wrote:

I have created an account file for a fiscal year that begins 1st July and
ends 30th June of the next Year.
I Need a report for each quarter separately. My Table Accounts has a
field Accountsdate. In the relevant query of the report First Quarter in
the Criteria of the field Accountsdate I have inserted
[Accounts].AccountsDate Between 1/10 And 31/12.
Report only shows the results of the dates between 1/10 and 31/12 but of the
present year.
I need the report to show results of the quarter of the previous year


You can use the DateSerial() function to generate your criteria:

BETWEEN DateSerial([Enter fiscal year:], ([Enter quarter:]-1)*3+6, 1) AND
DateSerial([Enter fiscal year:], ([Enter quarter:]-1)*3 + 9, 0)

--

John W. Vinson [MVP]
  #6  
Old May 8th, 2009, 06:35 PM posted to microsoft.public.access
[email protected]
external usenet poster
 
Posts: 129
Default Criteria for results in report of previous year

Perhaps its as well to make clear that that only applies to entering
criteria in query design view where Access will automatically convert
UK format dates to US format dates in the query's SQL on systems with
UK regional date settings.

In SQL or VBA date literals must be in US format or an otherwise
internationally unambiguous format. #1/10/07# would be interpreted as
10 January 2007; #31/12/07# would be interpreted correctly as 31
December 2007 but only due to the unambiguous nature of the date. Its
probably best to stick with the ISO standard of YYYY-MM-DD:

WHERE AccountsDate BETWEEN #2007-10-01# AND #2007-12-31#

Ken Sheridan
Stafford, England

On May 8, 12:45 pm, "KC-Mass" connearney_AT_comcast_Period_net
wrote:
If it is a date/Time field then I assume it contains the year so if you want
the data for the second quarter of FY 07 then look for dates Between
#1/10/07# and #31/12/08#

"reterrig" wrote in message

...

My table includes only field with the Date/Time


"KC-Mass" wrote:


Does your table not include a field with the FiscalYear??


"reterrig" wrote in message
...
I have created an account file for a fiscal year that begins 1st July
and
ends 30th June of the next Year.
I Need a report for each quarter separately. My Table "Accounts" has a
field "Accountsdate". In the relevant query of the report "First
Quarter"
in
the Criteria of the field "Accountsdate" I have inserted
"[Accounts].AccountsDate Between 1/10 And 31/12".
Report only shows the results of the dates between 1/10 and 31/12 but
of
the
present year.
I need the report to show results of the quarter of the previous year


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.