View Full Version : MSAccess report

07-12-2002, 05:59 PM
I have a MSAccess calendar-style report that sets out dates and days etc in the main report, with events for that day in a sub report. The whole thing is arranged in seven columns for days of the week.
I want to have holidays and weekends etc shaded when I print a range of dates. I have tried using an "if... " statement to change the backcolour of the detail. However, if the first date selected is contained within the "if.." condition, then the whole calendar is shaded. And if the date range contains holidays, no shading happens.
Any thoughts about how to tackle this?

07-12-2002, 06:07 PM
Set your holidays in a seperate table.

Convert the date to a day and refer to the week number (which will depend on when you have the week starting - Monday or Sunday) when setting the the background colour of the field.
Use Or in the function when referring to holidays from the other table.

Another option is to use Case.

07-12-2002, 06:08 PM
week number should read day number

07-12-2002, 06:09 PM
Convert the date to a day should read Convert the date to a weekday