Complex Date Criteria

Local time
Today, 20:13
Joined
Jul 12, 2006
Messages
70
I have a query which i would want to show records between January 2004 and September 2004, assuming the [Current Month] is October 2005.

The idea is to have a listing of sold policies between the first month of previous year and the month (of previous year) prior to the current month/year.

Here's the criteria i used:
Between DateSerial(Year([Enter: Current Month])-1,2,0) And DateSerial(Year([Enter: Current Month])-1,Month([Enter: Current Month]),0)

The criteria only shows records between July 2004 and September 2004.

How can i show records beginning January 2004?

:confused:
 
WHERE Format(DateField,"myyyy") = [Enter: Month] & [Enter: Month]-1
 
Sheila -

Place this in the criteria cell of your date field:
Code:
Between DateSerial(Year(Date())-1,1,1) And DateSerial(Year(Date())-1,Month(Date()),0)))

This will provide records from 1 Jan of the previous year to the last day of the month (in previous year) prior to the current month.

HTH - Bob
 

Users who are viewing this thread

Back
Top Bottom