Expiration Rule for Query 18 months not to exceed a calendar year

J

JanW

I'm trying to write a formula in a query to determine an expiration date.

Expiration rule is: 18 months not to exceed a calendar year. When is the due
date? The repeat factor is 18 months but do not exceed a calendar year.
 
J

John Spencer

You need to explain that a bit better. 18 months not to exceed a calendar
year (a calendar year has only 12 months).

If you can't explain in words, then give a couple examples.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
K

KARL DEWEY

Do you mean to pull record for their expiration date of 18 months but ONLY IF
within the current calendar year?
Year(DateAdd("m", 18, [SomeDate])) = Year(Date())
 
J

JanW

A person has training on a certain date. Depending on when in a year, he has
to have recurrent training in 18 months (longest span) but cannot go past a
calendar year.

Training Date January, 2008 Next training due July, 2009
Training Date August 1, 2008 Next training due by Dec 31, 2009 (18 months
would go beyond calendar year)
 
K

KARL DEWEY

Your explaination does not follow.
Training Date January, 2008 Next training due July, 2009 is 12 months,
not 18.

Training Date August 1, 2008 Next training due by Dec 31 you say would in
error to the rule but you did not say what the next traing date should be
when you applied the rule. What would it be?
 
J

JanW

January 2008 to July 2009 is 18 months. January 2008 to January 2009 would
be 12 months. This person would expire with the 18 month part of the rule (18
months).

Training Date August 1, 2008 Next training due by Dec 31 you say would in
error to the rule but you did not say what the next training date should be
when you applied the rule. What would it be?
Do not exceed calendar year. Training would be due by 12/31/2009. If you
considered the entire 18 months the person wouldn’t need training until Feb
2010. The person would not have had training in 2009, he would have exceeded
the next calendar year.
Confusing I know.


KARL said:
Your explaination does not follow.
Training Date January, 2008 Next training due July, 2009 is 12 months,
not 18.

Training Date August 1, 2008 Next training due by Dec 31 you say would in
error to the rule but you did not say what the next traing date should be
when you applied the rule. What would it be?
A person has training on a certain date. Depending on when in a year, he has
to have recurrent training in 18 months (longest span) but cannot go past a
[quoted text clipped - 18 lines]
 
J

John Spencer

An expression to generate the date might be something like:

IIF(DateAdd("M",18,SomeDate)>#12/31/2009#,#12/31/2009#,DateAdd("M",18,SomeDate))


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
January 2008 to July 2009 is 18 months. January 2008 to January 2009 would
be 12 months. This person would expire with the 18 month part of the rule (18
months).

Training Date August 1, 2008 Next training due by Dec 31 you say would in
error to the rule but you did not say what the next training date should be
when you applied the rule. What would it be?
Do not exceed calendar year. Training would be due by 12/31/2009. If you
considered the entire 18 months the person wouldn’t need training until Feb
2010. The person would not have had training in 2009, he would have exceeded
the next calendar year.
Confusing I know.


KARL said:
Your explaination does not follow.
Training Date January, 2008 Next training due July, 2009 is 12 months,
not 18.

Training Date August 1, 2008 Next training due by Dec 31 you say would in
error to the rule but you did not say what the next traing date should be
when you applied the rule. What would it be?
A person has training on a certain date. Depending on when in a year, he has
to have recurrent training in 18 months (longest span) but cannot go past a
[quoted text clipped - 18 lines]
Expiration rule is: 18 months not to exceed a calendar year. When is the due
date? The repeat factor is 18 months but do not exceed a calendar year.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top