Change backcolour depending on month

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
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top