Something like the following UNTESTED snippet where your controls are named
Txt1 to Txt31.
For I = 1 to 31
IF Day(Date()) = I Then
Me("Txt" & I).BackColor = rgb(255,0,0)
ELSE
Me("Txt" & I).BackColor = vbwhite
END IF
Next
Or even simpler in your case
Me("Txt" & Day(Date()).BackColor = rgb(255,0,0)
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
> I have a crosstab report that has the days of the month across the top
> as "column headings" and workcenters as rows with accomplished hours
[quoted text clipped - 12 lines]
> txt15 (txt plus the date number). Is there a way to basically state
> like Day(now()) = stgTextbox. Me.stgTextbox.backcolor = rgb(255,0,0)?
NeoFax - 27 May 2008 15:45 GMT
> Something like the following UNTESTED snippet where your controls are named
> Txt1 to Txt31.
[quoted text clipped - 34 lines]
>
> - Show quoted text -
Thanks! It worked great!