I have an Attendance database for employees. I have a table named tblActiveHourly that holds employee info such as:
EmployeeNumber
DateHired
Department
The Attendance table contains records of days absent with fields
EmployeeNumber
Date
Reason
Predefined reasons for absence are selected from a drop down box.
I have a query based on the attendance table and the tblActiveHourly with calculated fields that look at the DateHired and the current date and determines how many years the employee has worked and how many weeks vacation the employee has earned.
Now I would like to figure out how to look at the anniversary date and the current date to count the vacation days used from the attendance table. Here is what I came up with to determine the anniversary date and it works:
AnniversaryDate: DateValue(DatePart("m",[DateHired]) & "/" & DatePart("d",[DateHired]) & "/" & DatePart("yyyy",Now()))
It will give me the anniversary date, but I can't figure out how to restrict the records to dates between the Anniversary date and current date. Does that make sense?
I've been beating my head against this wall all day and all I'm getting for my efforts is a sore head. Can someone please, please, please help???
EmployeeNumber
DateHired
Department
The Attendance table contains records of days absent with fields
EmployeeNumber
Date
Reason
Predefined reasons for absence are selected from a drop down box.
I have a query based on the attendance table and the tblActiveHourly with calculated fields that look at the DateHired and the current date and determines how many years the employee has worked and how many weeks vacation the employee has earned.
Now I would like to figure out how to look at the anniversary date and the current date to count the vacation days used from the attendance table. Here is what I came up with to determine the anniversary date and it works:
AnniversaryDate: DateValue(DatePart("m",[DateHired]) & "/" & DatePart("d",[DateHired]) & "/" & DatePart("yyyy",Now()))
It will give me the anniversary date, but I can't figure out how to restrict the records to dates between the Anniversary date and current date. Does that make sense?
I've been beating my head against this wall all day and all I'm getting for my efforts is a sore head. Can someone please, please, please help???