首页> 外文期刊>Access Advisor >Conditional Formatting in Microsoft Access Forms and Reports
【24h】

Conditional Formatting in Microsoft Access Forms and Reports

机译:Microsoft Access表单和报表中的条件格式

获取原文
获取原文并翻译 | 示例
           

摘要

Every Access developer faces the problem sooner or later. You change a property of a control on a continuous subform, and to your dismay, it affects all the rows of the form. For example, suppose you want to make all order quantities greater than 10 stand out. Perhaps, you would write code in the AfterUpdate event of the txtQuantity textbox that looks something like this: like this: With Me. txtQuantity.FontBold=(.Value > 10) End with And what would this magnificent code do? As you edit the quantity, your code would change the boldness of the quantity text on every row. The problem, of course, is that each control on a continuous form has only one set of property values; there isn't a different set for each row. When you change a property, it affects all the rows. The above example uses the FontBold property (which is either true or false), but what you really want to achieve is different colors for the fore color or background color based on some expression, or perhaps simply based on whether the control has focus.
机译:每个Access开发人员迟早都会面临该问题。您更改了连续子窗体上控件的属性,但令您沮丧的是,它影响了窗体的所有行。例如,假设您要使所有大于10的订购数量脱颖而出。也许,您应该在txtQuantity文本框的AfterUpdate事件中编写代码,如下所示:像这样:和我在一起。 txtQuantity.FontBold =(。Value> 10)结尾并且这个宏伟的代码会做什么?在编辑数量时,您的代码将更改每行上数量文本的粗体。当然,问题在于连续形式上的每个控件都只有一组属性值。每行没有不同的集合。更改属性时,它会影响所有行。上面的示例使用FontBold属性(为true或false),但是您真正想要实现的是基于某些表达式,或者可能仅基于控件是否具有焦点,针对前景色或背景色使用不同的颜色。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号