I've done this before a while ago, but need to refresh my memory..
I've created a table tblDates which has sequential dates together with a yes/no field to indicate whether the date should be excluded from a count (based on weekends and bank holidays). I've built a query to only list dates between FirstDate and LastDate if they should not be excluded:
Code: Select all
SELECT tblHols.SomeName, tblDates.anyDate
FROM tblDates, tblHols
WHERE (((tblDates.anyDate) Between [FirstDate] And [LastDate]) AND ((tblDates.ExcludeIt)=No))
ORDER BY tblDates.anyDate;