access query to get employees from database


I have a database, I need to run a report on employees who are on holiday at a specified date.

The report works great, and is picking up everyone who is on holiday on a specified date...

the problem I have, is that holidays are entered in advance, and when someone leaves the company, they are still showing up in the report.... I could exclude them in the query, but that would affect the results when they were an employee and had a holiday... soo..

my employee table has a field named employee_status, and status 1 is live, 3 is leaver

I also have a field in employees table for leaving date, this is either 01/01/1900 if the employee is live or the leaving date if they left.

so... how can I incorporate into the query that information, so that the query will show any holidays for any employee when they are 'live'?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gustav BrockCIOCommented:
Apply a filter: where leavingdate = #1/1/1900# or leavingdate > holidaydate


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cycledudeAuthor Commented:
Gustav BrockCIOCommented:
You are welcome!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.