I'm having a problem getting this query to work. I am trying to report on holidays people have taken and will take. Employees are allowed a quota of days holiday. The database records days they have taken in one table, together with how many days they have had. But people are also allowed to pre-book holidays, the start dates and end dates for which are stored in another table.
I have managed to make it calculate how many days holiday they have left using a query, but I have problems where they book hols for the following year. Using queries it either returns holidays for this year and next, taking it off this year's total, which is wrong, or it does not return anything unless they have taken some holiday AND booked some for the same year.
I want the user to be able to enter the year to query and for it to return entitlement - holiday taken this year - holiday pre booked this year, and ignore entries in each table concerning any other year.
Hope I've explained this clearly enough.
Thanks in advance.
Stuart
I have managed to make it calculate how many days holiday they have left using a query, but I have problems where they book hols for the following year. Using queries it either returns holidays for this year and next, taking it off this year's total, which is wrong, or it does not return anything unless they have taken some holiday AND booked some for the same year.
I want the user to be able to enter the year to query and for it to return entitlement - holiday taken this year - holiday pre booked this year, and ignore entries in each table concerning any other year.
Hope I've explained this clearly enough.
Thanks in advance.
Stuart