Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Holiday Year Problem - Access 97

Status
Not open for further replies.

Luther1978

Technical User
Nov 13, 2002
74
GB
Hi all,
I'm putting together an Access DB for Employees.
I have created a table to hold employees booked/taken holidays, simply a start date and a duration of time booked in working days.

I have produced a query that creates totals from the holiday's booked and takes this value from each employee's entitlement to give the amout of days each employee has left. Great, all works fine except my employees all have a different start to their holiday year.

This causes a major problem at a time like now when next year's holidays have been booked, as I have employees with negative values for holiday left due to next years holidays being included in the query.

I have a field to hold an employees holiday year commencement date. dd/mm/yy. I would like to be able to drop the year field if I can, though using masks it can be ignored. Anyone have any ideas as to what calculation I can build to automatically query each employee on their particular holiday Year?

Thanks in advance

Martin King


My Table Structures if of Any help.

Personal Details Holiday
---------------- --------------
Employee ID Holiday Ref No
Leave Year Commencement Employee ID
Holiday Left Holiday Date
Holiday Entitlement Duration

Relationship:
(Employee ID) 1----To--------Many (Employee ID)
 
I have manaaged to solve my own problem, wasn't aware that Access/VB had a command DatePart. Easy really.

Many Thanks

Martin King
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top