I am developing a report that uses a crosstab query as its recordsource. This gives me fields with names 1 to 31. They are the possible days of the month. What I am trying to do is to
1) Hide fields on the report if it is February (i.e. 28 days)
2) Change the backcolor of the control if the field is a Saturday or Sunday.
I am thinking that I can do number 2 in conditional formating and number 1 in code on the on format/print event. So far so good.
The problem I have is the calculation behind it all. I have a global variable with a month start date retrieved by a procedure called rpb() and I have the field name 1-31.
Using the date and field name:-
1) how would I be able to create an expression that equates to true/false for the conditional formating?
2) how would I code to set the visible property to false if the number of days in the reported month was below 31?
Maybe there are easier ways to do this.
Thanks in advance for any help.
Jonathan
1) Hide fields on the report if it is February (i.e. 28 days)
2) Change the backcolor of the control if the field is a Saturday or Sunday.
I am thinking that I can do number 2 in conditional formating and number 1 in code on the on format/print event. So far so good.
The problem I have is the calculation behind it all. I have a global variable with a month start date retrieved by a procedure called rpb() and I have the field name 1-31.
Using the date and field name:-
1) how would I be able to create an expression that equates to true/false for the conditional formating?
2) how would I code to set the visible property to false if the number of days in the reported month was below 31?
Maybe there are easier ways to do this.
Thanks in advance for any help.
Jonathan