View Full Version : monthly report ???


Murley
03-19-2002, 10:00 AM
Hi,

Who can write an expression to query all changes by date for the current month, but also if for example today is april 1, query all changes for march ???

Thanks,
Murley http://www.access-programmers.co.uk/ubb/smile.gif

David R
03-19-2002, 11:14 AM
Assuming you have a field that records these changes, and that it's formatted as Date/Time, use this as criteria for "Last Month's Data":
Between DateSerial(Year(Now()),Month(Now())-1,1) And DateDiff("d",1,DateSerial(Year(Now()),Month(Now()),1))

For this month, you can just use Month([ChangedDateField]) and Criteria: Month(Now()), or structure it similar to above... Make sure you include a similar field for Year() or you'll get a lot more data than you intend to.

HTH,
David R

[This message has been edited by David R (edited 03-19-2002).]

Murley
03-20-2002, 02:43 AM
Thanks works great!

Murley http://www.access-programmers.co.uk/ubb/smile.gif