Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional formating expression

Status
Not open for further replies.

UHNSTrust

Technical User
Dec 2, 2003
262
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top