访问报告:当字段为空时隐藏字段和标签

编程入门 行业动态 更新时间:2024-10-25 09:24:12
本文介绍了访问报告:当字段为空时隐藏字段和标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好: 在Access 2003上:我有一个表格形式,相关字段旁边有标签。当相关字段为空时,我希望它们都消失。 (Can Shrink将为该字段执行此操作,但标签仍然存在,因此报告不会缩小。) 任何想法如何使标签缩小? 谢谢,

Hi all: On Access 2003: I have a tabular form with labels next to the associated fields. I''d like them both to dissappear when the associated field is null. ("Can Shrink" will do this for the field, but the label is still there, so the report does not shrink.) Any ideas how I can make the label shrink too? Thanks,

推荐答案

只需将标签更改为没有背景颜色的文本框,并设置条件格式,以便如果值为null(或[control] =""),则文本与背景颜色相同。您将需要锁定和禁用文本框,以便在不应该看到文本时不能选择该文本。 Simply change the label to a text box with no backcolor, and set conditional formatting so that if the value is null ( or [control] = "" ), the text is the same color as the background. You will want to lock and disable the text box so the text can''t be selected when it is not supposed to be visible.

谢谢。 实际上,我找到了一个不同的答案:我将标签更改为文本框并将控制源设置为iif(isnull([相关控制]),null,标题标题 )。然后我将标签的Can Shrink属性和与控件相关的属性设置为Yes。 Thanks. Actually, I found a different answer: I changed the label to a text box and set the control source to iif(isnull([related control]),null,"Label Title"). Then I set the Can Shrink properties for the label and the related to control to Yes.

感谢您分享您的解决方案。这可能是一个更好的主意,因为我经历了条件格式化的缓慢更新。 Thank you for sharing your solution. That''s probably a much better idea, since I''ve experienced slow updating with conditional formatting.

更多推荐

访问报告:当字段为空时隐藏字段和标签

本文发布于:2023-11-11 10:25:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1578160.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字段   为空   标签   报告

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!