Troublesome Count

Thecherub

Man with a Mission
Local time
Today, 07:52
Joined
Jan 14, 2004
Messages
92
I have a Query that is working Mostly.

the problem stems from a Count Field. The Field in question has the Criteria "<Date()" the field is hovever not working for the only person who has days that meet the criteria and days that do not the Access is displaying the Total # Days? How do i get the system to list the count right.

"SELECT [Employee List].Department, [Employee List].[Last Name], [Employee List].[First Name], [Employee List].[Seniority Date], [Employee List].[Vacation Elegibility], Count([Time off Booked].[Time Off Booked]) AS History, Count([Time off Booked].[Time Off Booked]) AS [CountOfTime Off Booked], [Time off Booked].[Time Off Booked]
FROM [Employee List] INNER JOIN [Time off Booked] ON [Employee List].[Employee Number] = [Time off Booked].[Employee Number]
GROUP BY [Employee List].Department, [Employee List].[Last Name], [Employee List].[First Name], [Employee List].[Seniority Date], [Employee List].[Vacation Elegibility], [Time off Booked].[Time Off Booked]
HAVING (((Count([Time off Booked].[Time Off Booked]))<Date()) AND (([Time off Booked].[Time Off Booked])="vacation approved"));"

If it helps here is the query code. I'm stumped here.
 
Further Information

Well on Further investigation all future dates are being regognized as being "<Date()" what criteria should I be using to avoid this problem?

everthing else on my reports and queries work.

This is the last thing i need to fix.

this Datbase is for Time Off. On my report i need to list Vacation Elegibility (no problem this works) Vacation Taken (the less than todays date count) the Vacation Scheduled (anything that is Greater than or equal to todays date)(of the Total less the Vac Taken to be sneaky) and the Vacation remaining(this works)

What criteria should i be using I'm totaly lost here. :(
 

Users who are viewing this thread

Back
Top Bottom