fat controller
Slightly round the bend..
- Local time
- Today, 07:01
- Joined
- Apr 14, 2011
- Messages
- 758
Evening all
I am trying to decide what is the best way in VBA to have the code check the following:
I will have a table which has some employee data (Name, EmployeeID, StartDate), and I am trying to have code take a look at a 'qualifying year', and then give a yes/no answer (which will then move on to the next criteria check) - but there is a bit of additional stuff needed.
Each qualifying year will run from 1st January through to 31st December, and if it is the employees first year of employment, they must work at least 44 weeks of that year to qualify - so essentially, if they start anything later than 56 days into their first year, the answer is no.
As this has to be historical, we will be having qualifying years back into the 80's (no, I am not kidding!), so a user will enter the qualifying year that they are looking at into a field (presumably a date field) in "yyyy" format; if that year is any year after the year of the employee's start date, then the answer from the code will always be yes - only if it is the same year as their start year will I need it to check whether their start date is before or after the 56 days. This check could be done as an After Update event on the qualifying year field (QualYear)
Confused yet?
I am sure that there will be a relatively simple way to do this, but I thought I would ask advice before i even begin, then I am sure that I am doing it the right way from the start.
I am trying to decide what is the best way in VBA to have the code check the following:
I will have a table which has some employee data (Name, EmployeeID, StartDate), and I am trying to have code take a look at a 'qualifying year', and then give a yes/no answer (which will then move on to the next criteria check) - but there is a bit of additional stuff needed.
Each qualifying year will run from 1st January through to 31st December, and if it is the employees first year of employment, they must work at least 44 weeks of that year to qualify - so essentially, if they start anything later than 56 days into their first year, the answer is no.
As this has to be historical, we will be having qualifying years back into the 80's (no, I am not kidding!), so a user will enter the qualifying year that they are looking at into a field (presumably a date field) in "yyyy" format; if that year is any year after the year of the employee's start date, then the answer from the code will always be yes - only if it is the same year as their start year will I need it to check whether their start date is before or after the 56 days. This check could be done as an After Update event on the qualifying year field (QualYear)
Confused yet?
I am sure that there will be a relatively simple way to do this, but I thought I would ask advice before i even begin, then I am sure that I am doing it the right way from the start.