View results per month

  • Thread starter Thread starter dkuntz
  • Start date Start date
D

dkuntz

Guest
I would like to display all of our [Orders] in the current month up to the current day without the user having to type in a date range i.e Between [Enter Start Date: ] and [....]

This will be displayed in a report
example:
- since today is 12/24, I would show all of the [Orders] from 12/01/02 to 12/24/02.

- On Jan. 4, I would show all of the [Orders] from 01/01/03 to 01/04/03

I assume some sort of "Month" fuction would need to be used in the [TransDate] field in the Query.

Any help or suggestions are appreciated!!

Merry Christmas!
 
To get the first day of the current month/year, use: DateSerial(Year(date()), Month(date()), 1) so your WHERE statement would read (changing table and field names as necessary):
Code:
FROM tblMyDates
WHERE (((tblMyDates.MyDate) Between DateSerial(Year(Date()),Month(Date()),1) And Date()));
 
Thank you very much!

Happy Holidays
 

Users who are viewing this thread

Back
Top Bottom