Years in Service

P

Pete

YearsService: DateDiff("yyyy",
[DateOfCommencement],DateSerial(Year(Date()),12,31))

I use the above statement in a query to calculate the length of time
an Employee has been employed, I then filter this to look for those
with 25 or 35 years service.

How could I then amend this to look ahead for the next 3 years e.g
2007,2008,2009 and see how many employees qulaify for Long Service in
the forthcoming years

Thanks in advance

Peter
 
G

Guest

Hi Pete

Use the following...

YearsService: DateDiff("yyyy",
[DateOfCommencement],DateSerial(Year(Date())+[Enter Years Ahead],12,31))

Keep your filter as =25 or =35
When the query is run you will get a prompt "Enter Years Ahead"
Enter 0 for normal runs to see those with long service now.
Enter 3 to see those who will qualify in 3 years etc

Regards

Andy Hull
 
R

RBear3

To see those coming up next year, look for those with 24 or 34 years of
service.

To see those coming up in the following year, look for those with 23 or 33
years of service.

etc.
 
G

Guest

Hi Pete

I suppose the obvious answer is to say filter the list to show 24, 23 or 22
years, or 34, 33 or 32 years.

Andy.
 
P

Pete

Hi Pete

Use the following...

YearsService: DateDiff("yyyy",
[DateOfCommencement],DateSerial(Year(Date())+[Enter Years Ahead],12,31))

Keep your filter as =25 or =35
When the query is run you will get a prompt "Enter Years Ahead"
Enter 0 for normal runs to see those with long service now.
Enter 3 to see those who will qualify in 3 years etc

Regards

Andy Hull



Pete said:
YearsService: DateDiff("yyyy",
[DateOfCommencement],DateSerial(Year(Date()),12,31))
I use the above statement in a query to calculate the length of time
an Employee has been employed, I then filter this to look for those
with 25 or 35 years service.
How could I then amend this to look ahead for the next 3 years e.g
2007,2008,2009 and see how many employees qulaify for Long Service in
the forthcoming years
Thanks in advance
Peter- Hide quoted text -

- Show quoted text -

Thanks very much to all for their help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top