Forum Home
Press F1
 
Thread ID: 27949 2002-12-07 04:59:00 MSAccess report PeterF (1095) Press F1
Post ID Timestamp Content User
103958 2002-12-07 04:59:00 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?
PeterF (1095)
103959 2002-12-07 05:07:00 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.
Merlin (503)
103960 2002-12-07 05:08:00 week number should read day number Merlin (503)
103961 2002-12-07 05:09:00 Hmm
Convert the date to a day should read Convert the date to a weekday
Merlin (503)
1