staff holidays (1 Viewer)

SDB

Registered User.
Local time
Today, 22:21
Joined
Sep 16, 2004
Messages
39
Hi All,

I need a query to tell me how many staff are on holiday on the same day..here what i have so far.

A query with name, startholsdate,endholsdate, totaldays, etc, etc,,

records showing; employee A books 01/01/06 to 14/01/06 and employee B books 10/01/06 to 24/01/06 C books 01/02/06 to 10/02/06 and so on,

I need to show how many employees are off on what days eg employee A and B are on hols between 10/01/06 and 14/01/06, so only 3 more staff may take days off between the 10th and 14th. I have tried all sorts of calculations but to no avail? can anyone help..

thanks
 

Jon K

Registered User.
Local time
Today, 22:21
Joined
May 22, 2002
Messages
2,209
SELECT *
FROM [TableName]
WHERE [EndHolsDate]>=[Enter Start Date] And [StartHolsDate]<=[Enter End Date];

When the query is run, the user can enter 10/01/2006 and 14/01/2006 to return employees A and B.


If you use two text boxes on a form for the user to enter the Start Date and End Date, you can replace the two parameters in the query with two expressions e.g. [Forms]![FormName]!txtStartDate and [Forms]![FormName]!txtEndDate
.
 

SDB

Registered User.
Local time
Today, 22:21
Joined
Sep 16, 2004
Messages
39
cheers jon k, you have given me some ideas, if I build the form around the book hols query I can use your adapt your query to show what i need..again many thanks
 

Users who are viewing this thread

Top Bottom