Conditional formatting as "expression is"

zfind

Registered User.
Local time
Today, 05:01
Joined
Jul 11, 2008
Messages
55
Hey all,

I'm trying to change the forecolor of control A on a subform based on the value of another control B on the same subform. The subform displays as a datasheet.

Here's what I've got in control A's conditional formatting box:

[Control B]>=(Format([Date],"ww",0,0))

Control B contains a week number 01-52, so I want it to compare that value to the current week and change the text colour to blue if it equals this week or later.
 
The current week would be Date() not [date], using the square brackets access is expecting the control to be on the form, not as a function.

Also take note that this way week 50 of 2008 is > week 2 of 2009... Dont know if this is what you want... but something to keep in mind.
 
Great! thanks for the above, it triggered in my mind that the data was a remnant from another function where I copied the format command from. The below works perfectly:

Code:
[WeekID]>=Format(Now(),"ww",0,0)
 

Users who are viewing this thread

Back
Top Bottom