Full Version: Conditional Formatting On A Form Does Not Work
UtterAccess Forums > Microsoft® Access > Access Forms
Lin100
On a form, I have the field named Product_Code. I set conditional formatting
where if the value is equal to NULL, then the background is set to red. When
the value is null, the background color did not changed to red, but stay white.
The attachment has the picture of the conditional formatting.
RAZMaddaz
Make the Condition an "Expression Is."

Then enter the following: IsNull([YourFieldName])=True

RAZMaddaz
Lin100
Hi RAZMaddaz. I did as you have suggested, but the field is still not Red when it is null.
RAZMaddaz
Here is an example and another suggestion:

Expression Is: Len([FieldName])=0 (set background to red)

RAZMAddaz
Lin100
Hi RAZMaddaz.

IsNull([Product_Code])=True does work. It will highlight the field to red if it is null.
However, it will only highlight to red if the cursor is on that field. It the cursor
is not on that field then it is not red.
RAZMaddaz
CODE
However, it will only highlight to red if the cursor is on that field. It the cursor
is not on that field then it is not red.


I assume that is using your data? When I open the Form and delete data in the id_worker Field and use my "Enter" key afterwords, it works fine.

RAZMaddaz
missinglinq
Since the above suggestions should work...I'd assume that the Textbox Control was corrupted! Although we usually think of Forms, and even entire Databases, when we speak of corruption, Controls, such as Textboxes, can and do become corrupted, and seem particularly susceptible to this during app development. The test/cure for this is short and simple...delete and then re-create the Control...which is the first thing that I'd do, in this case.

Linq ;0)>
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.