View Single Post
  #6  
Old March 17th, 2010, 04:41 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Calculating Subsets of Data

So if I have this straight, you want to find any records that are within the
past six months (even if that's only one month's records)?

Take a look at Access HELP the DateAdd() function. You can use this to
determine the date six months before ... ?today's date?

And if you need a way to get "today's date", look up the Date() function.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"snowiii" wrote in message
...
The objective is the preceding 6 months...When there are less than 6
months
of preceding data, calculate based upon whatever that number might be
(e.g. -
1 month, 2 months, 3 months, 4 months, or 5 months of data)

"Jeff Boyce" wrote:

"most recent 6 months" could mean the preceding six months, or it could
mean, as 'kc' points out, the cumulative total so far since 1/1/ of the
current year (or 7/1/, if after June).

What do you mean?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.


"snowiii" wrote in message
...
I have data for records that can span between 1 to 16 months.. I want
to
be
able to calculate the average activity for the most recent six months
in a
query and be able to display that in a report.

I can create the calculation in the query for the entire duration of
months
for each record but am stuck on how to have it choose only the most
recent
six months of data to do the calculation and understand that the six
months
may really only be between 1 to 6 months of data..

Any suggestions would be greatly appreciated..My skill level is
somewhere
between meatball surgeon and kinda knowledgeable...



.