小编J.M*_*J.M的帖子

根据表中存储的值更改表单行的颜色

使用基于 Access 的应用程序。需要根据存储在这些字段中的值更改表单的某些特定行的颜色(需要更改每行“一个”字段的颜色)。例如,当我们打开表单时,我们需要在某一行的值为 1 的字段中看到绿色。如果该字段的值为 2,我们需要看到橙色,如果该字段的值为 3,则需要看到橙色。是红色的。

表单输出示例

ID   Criteria
201  1        --> the cell containing 1 should be colored in green
203  3        --> the cell containing 3 should be colored in red
204  3
205           --> the cell that contains nothing should be kept uncolored
206  1        
207  2
Run Code Online (Sandbox Code Playgroud)

注意:当表单打开时,值(1、2 和 3)已经可用,并且它们也存储在表中。

ms-access vba userform

1
推荐指数
1
解决办法
4974
查看次数

标签 统计

ms-access ×1

userform ×1

vba ×1