View Full Version : Use a Query to Generate a Monthly Report


Forsi
08-15-2008, 05:40 PM
Hello

I would like to create a query to list the employees who take leave during each month during the year and then use that query to generate a report which shows leave by month. At the end of the June, I would like to run a query to show all employees going on leave in July. The fields are Employee ID, Start Date, End Date. I can run a query which shows the fields listed before but it shows all leave taken from Jan to Now but that's not what I want. Can someone please direct me in detail?

Thanks
Forsi

raskew
08-15-2008, 07:50 PM
Hi -

In the criteria cell of your queries StartTime, copy/paste:
<DateAdd("m",1,DateValue([enter mm/yyyy]))

In the criteria cell of your queries EndTime, copy/paste:
Is Null Or >=DateValue([enter mm/yyyy])

This will give you start dates <= last day of the input month and end dates that are either blank or > first day of the input month.

When you run the query/report you'll be prompted to enter the desired mm/yyyy.

HTH - Bob

Forsi
08-16-2008, 07:08 AM
Bob

This is exactly what I was looking for - it worked like a charm. You are the best!
Thank you very much.

Forsi