Conditional Formatting Date()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a row of text boxes in which I use the Date()+x to give me a running
calendar column headings. In the Control Source of each box I have =Date()
=Date()+1 =Date()+2 and so on dwn the line. I hae the text box formatted like
m/dd ddd to identify calendar dates. My task is to have the days that are
either Saturday or Sunday turn a different color as the days roll across the
row of text boxes. I can't seem to identify the Sat or Sun in the conditional
formating. Can this be done?
 
Thanks for your reply Brian
I have been playing with the Weekday function and even with you suggestion,
I still get every unbound text box changing colors using the expression
provided. All days change even if they are 2,3,4,5,6.. Could this be casue by
the method I'm using the Date() function?

Brian said:
Set Condition1 to be Expression Is, and enter this:

Weekday([FieldName])=1 Or Weekday([FieldName])=7

1 is Sunday, 7 is Saturday. See the VBA help on the Weekday function.

Bugman said:
I have a row of text boxes in which I use the Date()+x to give me a running
calendar column headings. In the Control Source of each box I have =Date()
=Date()+1 =Date()+2 and so on dwn the line. I hae the text box formatted like
m/dd ddd to identify calendar dates. My task is to have the days that are
either Saturday or Sunday turn a different color as the days roll across the
row of text boxes. I can't seem to identify the Sat or Sun in the conditional
formating. Can this be done?
 
Hmmm...it works fine for me. Make sure that the expression in each box refers
to itself, not all to the same box

Box 1 expression: Weekday([Day1])=1 Or Weekday([Day1])=7
Box 2 expression: Weekday([Day2])=1 Or Weekday([Day2])=7

etc.


Box 7 expression: Weekday([Day7])=1 Or Weekday([Day7])=7

Where Day1 through Day7 are the names of the unbound boxes.


Bugman said:
Thanks for your reply Brian
I have been playing with the Weekday function and even with you suggestion,
I still get every unbound text box changing colors using the expression
provided. All days change even if they are 2,3,4,5,6.. Could this be casue by
the method I'm using the Date() function?

Brian said:
Set Condition1 to be Expression Is, and enter this:

Weekday([FieldName])=1 Or Weekday([FieldName])=7

1 is Sunday, 7 is Saturday. See the VBA help on the Weekday function.

Bugman said:
I have a row of text boxes in which I use the Date()+x to give me a running
calendar column headings. In the Control Source of each box I have =Date()
=Date()+1 =Date()+2 and so on dwn the line. I hae the text box formatted like
m/dd ddd to identify calendar dates. My task is to have the days that are
either Saturday or Sunday turn a different color as the days roll across the
row of text boxes. I can't seem to identify the Sat or Sun in the conditional
formating. Can this be done?
 
Good Call - How did you know I made that mistake. Thanks very much for your
assistance. Appreciate the help.

Brian said:
Hmmm...it works fine for me. Make sure that the expression in each box refers
to itself, not all to the same box

Box 1 expression: Weekday([Day1])=1 Or Weekday([Day1])=7
Box 2 expression: Weekday([Day2])=1 Or Weekday([Day2])=7

etc.


Box 7 expression: Weekday([Day7])=1 Or Weekday([Day7])=7

Where Day1 through Day7 are the names of the unbound boxes.


Bugman said:
Thanks for your reply Brian
I have been playing with the Weekday function and even with you suggestion,
I still get every unbound text box changing colors using the expression
provided. All days change even if they are 2,3,4,5,6.. Could this be casue by
the method I'm using the Date() function?

Brian said:
Set Condition1 to be Expression Is, and enter this:

Weekday([FieldName])=1 Or Weekday([FieldName])=7

1 is Sunday, 7 is Saturday. See the VBA help on the Weekday function.

:

I have a row of text boxes in which I use the Date()+x to give me a running
calendar column headings. In the Control Source of each box I have =Date()
=Date()+1 =Date()+2 and so on dwn the line. I hae the text box formatted like
m/dd ddd to identify calendar dates. My task is to have the days that are
either Saturday or Sunday turn a different color as the days roll across the
row of text boxes. I can't seem to identify the Sat or Sun in the conditional
formating. Can this be done?
 
I've paid the price for making lots of those oversights myself...that's how I
know.

Bugman said:
Good Call - How did you know I made that mistake. Thanks very much for your
assistance. Appreciate the help.

Brian said:
Hmmm...it works fine for me. Make sure that the expression in each box refers
to itself, not all to the same box

Box 1 expression: Weekday([Day1])=1 Or Weekday([Day1])=7
Box 2 expression: Weekday([Day2])=1 Or Weekday([Day2])=7

etc.


Box 7 expression: Weekday([Day7])=1 Or Weekday([Day7])=7

Where Day1 through Day7 are the names of the unbound boxes.


Bugman said:
Thanks for your reply Brian
I have been playing with the Weekday function and even with you suggestion,
I still get every unbound text box changing colors using the expression
provided. All days change even if they are 2,3,4,5,6.. Could this be casue by
the method I'm using the Date() function?

:

Set Condition1 to be Expression Is, and enter this:

Weekday([FieldName])=1 Or Weekday([FieldName])=7

1 is Sunday, 7 is Saturday. See the VBA help on the Weekday function.

:

I have a row of text boxes in which I use the Date()+x to give me a running
calendar column headings. In the Control Source of each box I have =Date()
=Date()+1 =Date()+2 and so on dwn the line. I hae the text box formatted like
m/dd ddd to identify calendar dates. My task is to have the days that are
either Saturday or Sunday turn a different color as the days roll across the
row of text boxes. I can't seem to identify the Sat or Sun in the conditional
formating. Can this be done?
 
Back
Top