View Single Post
  #2  
Old September 21st, 2009, 07:14 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Limiting Due dates to the current month (when the data is queried)

On Sun, 20 Sep 2009 21:11:01 -0700, Bob Waggoner
wrote:

In a calibration database I have a query that calculates due dates. I'd like
to limit the query to just the calibrations due in the current month. How do
I modify this formula to make only the current month's due dates show up?

Expr1: Format$(([MaxOfDateDone]+[FreqDays]),"mmm yyyy")

MaxofDateDone is a query that only looks at the last calibration done.
Frequency Days is the number of days that a piece of equipment goes before
it needs another calibration.

Thank you for your help.


Correct the criteria in your query MaxOfDaysDone, using a criterion such as

= DateSerial(Year(Date()), Month(Date()), 1) AND DateSerial(Year(Date()), Month(Date()) + 1, 1)


to retrieve only dates during the current month. You can't do it in the
Format() function.
--

John W. Vinson [MVP]