Subform's Conditional Formatting Not Updating on Data Change - Access 2007 and 2010

M_S_Jones

Registered User.
Local time
Today, 19:16
Joined
Jan 4, 2008
Messages
119
Hi,

I'm trying to do something which I have done many times in Access 2002, but I can't achieve in versions 2007 and 2010. I have a continuous subform with conditional formatting applied to every object, for the font colour to change depending on the value of one particular object. This does work at the point the subform is loaded, but if I change the value, the font colour is only changed in that one field.

For example, let's say I have three objects, one each for Fields1, 2 and 3. When I apply conditional formatting to all three, where expression is [Field1]='A' to have red font, and where [Field1]='B' to have blue font, I find that on loading the subform, all lines with 'A' in field1 will be completely in red font, and all with 'B' will be in blue. However, if I change one of the 'A's to a 'B', the font will only turn blue in Field1 for that row, and the other fields will remain red, until I either change their values, or reload the subform.

I can't find anything online about this, and as I mentioned earlier, this logic works absolutely fine in Access 2002. I tried an on change event of repaint, but that didn't work. I'd be grateful of any advice anyone can offer.

Thanks,

Matthew
 
Perhaps you could upload a stripped down version of your db for us to look at.
 
Hi,

Thanks for your message. I have uploaded a sample database, based on the example I gave in my first post. As I said before, if I use exactly this logic in 2002, the font colour of the whole row changes on change of the field used in the expression (in this example, Field1). In 2007 and 2010 though, the font colour only changes in the other fields when they are changed afterwards, or when the form is loaded again.

Thanks,

Matthew
 

Attachments

Perfect, thank you. So I just needed to use the object in the expression, not the field. Strange that the field could be used in 2002, but at least I know now.

Thanks,

Matthew
 
I think since conditional formatting affects the control, it made sense for them to change it to look at control values, rather than field values. However, they should have still allowed a fields to be used.

It may even be a bug, who knows!
 

Users who are viewing this thread

Back
Top Bottom