6/30/2012

Conditional formatting - Change the formatting of a field in a report based on its value in Access 2003/XP/2000/97

Question: In Access 2003/XP/2000/97, I am trying to create a report that will have one field change colors based on the results of a query. How do I do this?
Answer: If you want to change a field in a report based on its value, 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 CategoryID field.


Under the Format menu, select Conditional Formatting.


When the Conditional Formatting window appears, enter the first condition. In our example, we've selected when the field value is less than 3.
Next, you need to select what formatting to apply when the condition is met. We've chosen to change the color of the font to green and we've applied bold to the font.


If you wish to apply more than one condition, you will need to click on the Add button. We've added two different conditions. When you're done, click on the OK button.


Now, when you preview the report, the conditional formatting will be applied. As you can see, the Category ID value is either bolded green when the value is less than 3, or bolded orange when the value is 3 or greater.



--
duytuan

No comments:

Post a Comment