Change backcolour depending on month

  • Thread starter Thread starter Kirstie Adam
  • Start date Start date
K

Kirstie Adam

Hey all,

I have a report which looks like a table

Jan Feb Mar Apr etc..
Books In 2 3 2 4
Books Out 1 3 6 5 etc..

The months are just plain old labels, but i would like to fix it so that
when i open the report, the month we are currently are in will highlight
in yellow. e.g. This month the July label would be yellow, but next month
it would be August.

Can anyone help?

Kirstie
 
Kirstie said:
I have a report which looks like a table

Jan Feb Mar Apr etc..
Books In 2 3 2 4
Books Out 1 3 6 5 etc..

The months are just plain old labels, but i would like to fix it so that
when i open the report, the month we are currently are in will highlight
in yellow. e.g. This month the July label would be yellow, but next month
it would be August.

Change the names of the labels to something like lblMonth1,
lblMonth2, . . .

Then use code in the report's Open event procedure:

Me("lblMonth" & Month(Date)).BackColor = vbYellow
 
Back
Top