开发者

Conditional Formatting in Access 2007 Report

I have created two reports in Access 2007 that are virtually identical except for the data source. In both of them I have set up conditional formatting on a fiel开发者_高级运维d to make the font italic when

Expression is [Status]="Holding"

In one of the reports the conditional formatting is applied and in the other it isn't. I've even tried setting it to

Expression is [Status]=[Status]

but the conditional formatting still isn't applied. Any ideas on what is going wrong?


I cleared the conditional formatting from all the text boxes where it was set. I then again set the conditional formatting to

Expression is [Status]="Holding"

This time it worked! Very strange, but at least it's working now.


I found this helpful excerpt on the Office website:

Before you begin When you use an expression to apply conditional formatting, you should make sure that > the controls being formatted do not use the same names as any of the fields in the form's or report's underlying record source. If you refer to a field in an expression and there is a control by the same name on the form or report, Access is unable to determine whether you are referring to the control or to the field. Because of this, Access cannot evaluate the expression. As a result, the conditional formatting is not applied, and the control appears with its default formatting. Whenever you add expressions to a form or report, it is very important that you rename any controls whose names conflict with field names that are used in the expressions.


Be also careful with the 'BackStyle' property of the control. If you use a form wizard and default style template the backstyle may be transparent - which means that conditional formatting with a backcolor does nothing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜