Use a Query to Generate a Monthly Report

Forsi

New member
Local time
Today, 10:37
Joined
Aug 15, 2008
Messages
7
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
 
Hi -

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

In the criteria cell of your queries EndTime, copy/paste:
Code:
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
 
Last edited:
Bob

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

Forsi
 

Users who are viewing this thread

Back
Top Bottom