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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

can you count and retrieving by periods?



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2009, 01:53 PM posted to microsoft.public.access.tablesdbdesign
Logsheet pencil pusher
external usenet poster
 
Posts: 2
Default can you count and retrieving by periods?

I have report data that I want to retrieve by periods for specific locations.
Each report period is six months in length, and I want to retrieve location
performance data for 24 months at a time.

Ideally; if I select May 2009 and New Zealand, the serach starts with the
most recent report period (March) and retrieves data for previous four
periods or 24 months.

Directions on how to do this would be greatly appreciated.
  #2  
Old May 26th, 2009, 02:44 PM posted to microsoft.public.access.tablesdbdesign
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default can you count and retrieving by periods?

hi,

Logsheet pencil pusher wrote:
Ideally; if I select May 2009 and New Zealand, the serach starts with the
most recent report period (March) and retrieves data for previous four
periods or 24 months.
Directions on how to do this would be greatly appreciated.

Use the DatePart() functions to create a number and use the Partition()
function to generate your periods. E.g. something like this:

Partition(
DatePart("m",dateField)+(DatePart("yyyy",dateField ))*12,
1, 9999999, 6)

You can then create a group based on that partitioned value.


mfG
-- stefan --
  #3  
Old May 26th, 2009, 02:58 PM posted to microsoft.public.access.tablesdbdesign
Logsheet pencil pusher
external usenet poster
 
Posts: 2
Default can you count and retrieving by periods?

thanks

"Stefan Hoffmann" wrote:

hi,

Logsheet pencil pusher wrote:
Ideally; if I select May 2009 and New Zealand, the serach starts with the
most recent report period (March) and retrieves data for previous four
periods or 24 months.
Directions on how to do this would be greatly appreciated.

Use the DatePart() functions to create a number and use the Partition()
function to generate your periods. E.g. something like this:

Partition(
DatePart("m",dateField)+(DatePart("yyyy",dateField ))*12,
1, 9999999, 6)

You can then create a group based on that partitioned value.


mfG
-- stefan --

 




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 08:58 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.