6/30/2012

Conditional formatting - Change the formatting of a field in a report when the field contains a NULL value in Access 2003/XP/2000/97

Question: In Access 2003/XP/2000/97, I'm trying to create a report that will highlight a field that "Is Null". How can I do this?
Answer: If you want to highlight a field that "Is Null", you can apply conditional formatting. To do this, open your Access report and highlight the field that you want to change the behavior of. In this example, we've selected the OrderDate field.


Under the Format menu, select Conditional Formatting.


When the Conditional Formatting window appears, select "Expression Is" from the drop-down. And then enter the following formula:
IsNull([OrderDate])=True


Next, you need to select what formatting to apply when the condition is met. We've decided to change the background color to purple when the OrderDate field contains a null value.


Your Conditional Formatting window should look like this:


Now, when you preview the report, the conditional formatting will be applied. As you can see, the OrderDate field is displayed in purple when a null value is encountered.

No comments:

Post a Comment