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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

24 rolling periods how to calculate.



 
 
Thread Tools Display Modes
  #1  
Old November 24th, 2009, 09:03 PM posted to microsoft.public.access.queries
mccloud
external usenet poster
 
Posts: 16
Default 24 rolling periods how to calculate.

Our ERP system stores sales history in 24 rolling periods. I have a form
that prompts the user for number of periods to review and an item. I'm
trying to build a query that looks up current period (23) Nov 2009, and
figure out which periods to review. As an example user may enter 6 for the
number of periods. So I would need to get data from periods 22 thru 17.
Because its a rolling period model and periods vary based on user input I'm
not sure how to handle. I thought about build a table that references which
periods to review but thought there might be an user way.

Thanks in advance for your replies. Also I'm sorry if this is a repeat from
an earlier post but I got an error.
  #2  
Old November 24th, 2009, 09:31 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 24 rolling periods how to calculate.

You did not say but I assume that each period is a calendar month. You did
not say but it seems you want period group to start from previous month
backwards through the number entered.

[YourPeriod] Between (DateDiff("m",Date(),#11/1/2009#)+23) And
(DateDiff("m",Date(),#11/1/2009#)+23)-[Enter number of periods]


--
Build a little, test a little.


"mccloud" wrote:

Our ERP system stores sales history in 24 rolling periods. I have a form
that prompts the user for number of periods to review and an item. I'm
trying to build a query that looks up current period (23) Nov 2009, and
figure out which periods to review. As an example user may enter 6 for the
number of periods. So I would need to get data from periods 22 thru 17.
Because its a rolling period model and periods vary based on user input I'm
not sure how to handle. I thought about build a table that references which
periods to review but thought there might be an user way.

Thanks in advance for your replies. Also I'm sorry if this is a repeat from
an earlier post but I got an error.

  #3  
Old November 24th, 2009, 09:33 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 24 rolling periods how to calculate.

Error - use this ---
You did not say but I assume that each period is a calendar month. You did
not say but it seems you want period group to start from previous month
backwards through the number entered.

[YourPeriod] Between (DateDiff("m",Date(),#11/1/2009#)+22) And
(DateDiff("m",Date(),#11/1/2009#)+22)-[Enter number of periods]


--
Build a little, test a little.


"mccloud" wrote:

Our ERP system stores sales history in 24 rolling periods. I have a form
that prompts the user for number of periods to review and an item. I'm
trying to build a query that looks up current period (23) Nov 2009, and
figure out which periods to review. As an example user may enter 6 for the
number of periods. So I would need to get data from periods 22 thru 17.
Because its a rolling period model and periods vary based on user input I'm
not sure how to handle. I thought about build a table that references which
periods to review but thought there might be an user way.

Thanks in advance for your replies. Also I'm sorry if this is a repeat from
an earlier post but I got an error.

  #4  
Old November 24th, 2009, 09:36 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 24 rolling periods how to calculate.

So Nov 2009 is period 23. Jan 2010 will be period 01.
I just read your other post and it does not match this one.

How can Jan 2010 be period 01 if Nov 09 is period 23?

--
Build a little, test a little.


"mccloud" wrote:

Our ERP system stores sales history in 24 rolling periods. I have a form
that prompts the user for number of periods to review and an item. I'm
trying to build a query that looks up current period (23) Nov 2009, and
figure out which periods to review. As an example user may enter 6 for the
number of periods. So I would need to get data from periods 22 thru 17.
Because its a rolling period model and periods vary based on user input I'm
not sure how to handle. I thought about build a table that references which
periods to review but thought there might be an user way.

Thanks in advance for your replies. Also I'm sorry if this is a repeat from
an earlier post but I got an error.

  #5  
Old November 25th, 2009, 04:01 PM posted to microsoft.public.access.queries
mccloud
external usenet poster
 
Posts: 16
Default 24 rolling periods how to calculate.

Jan 2010 is the start of the new cycle. So Dec 2009 is 24 and Dec 2010 will
be 12. So my code needs to look up current period and figure out which
periods to include.

"KARL DEWEY" wrote:

So Nov 2009 is period 23. Jan 2010 will be period 01.

I just read your other post and it does not match this one.

How can Jan 2010 be period 01 if Nov 09 is period 23?

--
Build a little, test a little.


"mccloud" wrote:

Our ERP system stores sales history in 24 rolling periods. I have a form
that prompts the user for number of periods to review and an item. I'm
trying to build a query that looks up current period (23) Nov 2009, and
figure out which periods to review. As an example user may enter 6 for the
number of periods. So I would need to get data from periods 22 thru 17.
Because its a rolling period model and periods vary based on user input I'm
not sure how to handle. I thought about build a table that references which
periods to review but thought there might be an user way.

Thanks in advance for your replies. Also I'm sorry if this is a repeat from
an earlier post but I got an error.

  #6  
Old November 25th, 2009, 04:31 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 24 rolling periods how to calculate.

What I posted (with 22) wil work until you start over.

When you start over you will have two series with the same numbers so it
won't work unless maybe you are going to renumber the old series.

--
Build a little, test a little.


"mccloud" wrote:

Jan 2010 is the start of the new cycle. So Dec 2009 is 24 and Dec 2010 will
be 12. So my code needs to look up current period and figure out which
periods to include.

"KARL DEWEY" wrote:

So Nov 2009 is period 23. Jan 2010 will be period 01.

I just read your other post and it does not match this one.

How can Jan 2010 be period 01 if Nov 09 is period 23?

--
Build a little, test a little.


"mccloud" wrote:

Our ERP system stores sales history in 24 rolling periods. I have a form
that prompts the user for number of periods to review and an item. I'm
trying to build a query that looks up current period (23) Nov 2009, and
figure out which periods to review. As an example user may enter 6 for the
number of periods. So I would need to get data from periods 22 thru 17.
Because its a rolling period model and periods vary based on user input I'm
not sure how to handle. I thought about build a table that references which
periods to review but thought there might be an user way.

Thanks in advance for your replies. Also I'm sorry if this is a repeat from
an earlier post but I got an error.

  #7  
Old December 1st, 2009, 07:36 PM posted to microsoft.public.access.queries
mccloud
external usenet poster
 
Posts: 16
Default 24 rolling periods how to calculate.

Not sure how to do this but I would like to use the current period and
current month as a starting point. So Dec 2009 and current period = 24.
Create a union query that would use this info and assign a month and year to
each period.
period 23 = 112009, period 22 = 102009 ect...

Any help would be great!

"KARL DEWEY" wrote:

What I posted (with 22) wil work until you start over.

When you start over you will have two series with the same numbers so it
won't work unless maybe you are going to renumber the old series.

--
Build a little, test a little.


"mccloud" wrote:

Jan 2010 is the start of the new cycle. So Dec 2009 is 24 and Dec 2010 will
be 12. So my code needs to look up current period and figure out which
periods to include.

"KARL DEWEY" wrote:

So Nov 2009 is period 23. Jan 2010 will be period 01.
I just read your other post and it does not match this one.

How can Jan 2010 be period 01 if Nov 09 is period 23?

--
Build a little, test a little.


"mccloud" wrote:

Our ERP system stores sales history in 24 rolling periods. I have a form
that prompts the user for number of periods to review and an item. I'm
trying to build a query that looks up current period (23) Nov 2009, and
figure out which periods to review. As an example user may enter 6 for the
number of periods. So I would need to get data from periods 22 thru 17.
Because its a rolling period model and periods vary based on user input I'm
not sure how to handle. I thought about build a table that references which
periods to review but thought there might be an user way.

Thanks in advance for your replies. Also I'm sorry if this is a repeat from
an earlier post but I got an error.

  #8  
Old December 1st, 2009, 07:36 PM posted to microsoft.public.access.queries
mccloud
external usenet poster
 
Posts: 16
Default 24 rolling periods how to calculate.

Not sure how to do this but I would like to use the current period and
current month as a starting point. So Dec 2009 and current period = 24.
Create a union query that would use this info and assign a month and year to
each period.
period 23 = 112009, period 22 = 102009 ect...

Any help would be great!

"KARL DEWEY" wrote:

What I posted (with 22) wil work until you start over.

When you start over you will have two series with the same numbers so it
won't work unless maybe you are going to renumber the old series.

--
Build a little, test a little.


"mccloud" wrote:

Jan 2010 is the start of the new cycle. So Dec 2009 is 24 and Dec 2010 will
be 12. So my code needs to look up current period and figure out which
periods to include.

"KARL DEWEY" wrote:

So Nov 2009 is period 23. Jan 2010 will be period 01.
I just read your other post and it does not match this one.

How can Jan 2010 be period 01 if Nov 09 is period 23?

--
Build a little, test a little.


"mccloud" wrote:

Our ERP system stores sales history in 24 rolling periods. I have a form
that prompts the user for number of periods to review and an item. I'm
trying to build a query that looks up current period (23) Nov 2009, and
figure out which periods to review. As an example user may enter 6 for the
number of periods. So I would need to get data from periods 22 thru 17.
Because its a rolling period model and periods vary based on user input I'm
not sure how to handle. I thought about build a table that references which
periods to review but thought there might be an user way.

Thanks in advance for your replies. Also I'm sorry if this is a repeat from
an earlier post but I got an error.

  #9  
Old December 1st, 2009, 07:36 PM posted to microsoft.public.access.queries
mccloud
external usenet poster
 
Posts: 16
Default 24 rolling periods how to calculate.

Not sure how to do this but I would like to use the current period and
current month as a starting point. So Dec 2009 and current period = 24.
Create a union query that would use this info and assign a month and year to
each period.
period 23 = 112009, period 22 = 102009 ect...

Any help would be great!

"KARL DEWEY" wrote:

What I posted (with 22) wil work until you start over.

When you start over you will have two series with the same numbers so it
won't work unless maybe you are going to renumber the old series.

--
Build a little, test a little.


"mccloud" wrote:

Jan 2010 is the start of the new cycle. So Dec 2009 is 24 and Dec 2010 will
be 12. So my code needs to look up current period and figure out which
periods to include.

"KARL DEWEY" wrote:

So Nov 2009 is period 23. Jan 2010 will be period 01.
I just read your other post and it does not match this one.

How can Jan 2010 be period 01 if Nov 09 is period 23?

--
Build a little, test a little.


"mccloud" wrote:

Our ERP system stores sales history in 24 rolling periods. I have a form
that prompts the user for number of periods to review and an item. I'm
trying to build a query that looks up current period (23) Nov 2009, and
figure out which periods to review. As an example user may enter 6 for the
number of periods. So I would need to get data from periods 22 thru 17.
Because its a rolling period model and periods vary based on user input I'm
not sure how to handle. I thought about build a table that references which
periods to review but thought there might be an user way.

Thanks in advance for your replies. Also I'm sorry if this is a repeat from
an earlier post but I got an error.

 




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 09:54 AM.


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