Access 2007 报告中的条件格式

发布于 2024-08-09 11:07:49 字数 285 浏览 1 评论 0原文

我在 Access 2007 中创建了两个报表,除了数据源之外,它们几乎完全相同。在这两个报告中,我都在字段上设置了条件格式,以便

Expression is [Status]="Holding"

在其中一个报告中应用了条件格式而在另一个报告中没有应用条件格式时,使字体变为斜体。我什至尝试将其设置为

Expression is [Status]=[Status]

但条件格式仍然没有应用。关于出了什么问题有什么想法吗?

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 field 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

余生再见 2024-08-16 11:07:49

我清除了设置条件格式的所有文本框中的条件格式。然后我再次将条件格式设置为“

Expression is [Status]="Holding"

这次成功了!”很奇怪,但至少现在可以用了。

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.

自由范儿 2024-08-16 11:07:49

我发现这个有用的摘录 Office 网站

开始之前
当您使用表达式应用条件格式时,应确保 >正在格式化的控件不使用相同的
名称为表单或报表的基础记录中的任何字段
来源。如果您引用表达式中的字段并且存在
在窗体或报表上使用相同名称的控件,Access 无法
确定您指的是控件还是字段。
因此,Access 无法计算该表达式。因此,
不应用条件格式,并且出现控件
及其默认格式。每当您将表达式添加到表单或
报告,重命名其名称的任何控件非常重要
与表达式中使用的字段名称冲突。

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.

看轻我的陪伴 2024-08-16 11:07:49

还要小心控件的“BackStyle”属性。如果您使用表单向导和默认样式模板,则背景样式可能是透明的 - 这意味着带有背景色的条件格式不会执行任何操作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文