Hello all,
Annual leave-I am trying to create a query to show me who is off work on a given date-'DateX'.
I have a table-tblLeave which has;
'LeaveID' as the pk,
StartDate-1st day of leave
EndDate -last day of leave
StaffID.
I have tried querying where if I give a date, if said date falls within the StartDate and EndDate, the data will show. Of course, using quries such as
Code:
SELECT *,
DateX >= StartDate And DateX < EndDate AS Active
FROM tblLeave;
gives me a value for all leave events that start before the DateX, and all end dates that finish after DateX....which is just about all leave events on the calendar.
Any ideas?
Many thanks,
Mattbro