May 17, 2021 MS Access
A particularly useful formatting tool in Access is the ability to apply conditional formats to highlight specific data. Let's look at a simple example of a conditional format.
In this example, we will use the form fSubCurrentProjects in our database.
We all have a list of items in this database, and we also have some new fields, such as punctuality status and the number of late tasks. T his form was created from another query.
In this query, we have a join between the table and the query that shows the count of due dates or how many items have expired tasks. b20> me.
In this example, we'll use the form above to learn how to use conditional formats to highlight specific information. b20> ew.
Now, select the Open Time Status field.
Now, go to the Format tab.
On the Format tab, you should see a group named Control Format and a special button for conditional format. Let's click on the conditional format now.
You will now see a conditional format rule manager, and we do not currently have rules applied to this control. Now let's create a new rule by clicking the New Rule button.
You will now see a new format rule dialog box. W e'll start by specifying the type of rule we're going to create, and here we have two options. ds.
We now have only one of the two values in our form; ry. /b10>Now let's select Field Value Is from the first combo box, and then equal from the second combo box. N ow enter the word "Late" in quotation marks.
We can now format the conditions, how do we want this field to look like if the word Late appears in that field. in. et's click OK now, then click the app, and then OK again.
As you can see, Late is now formatted. This is an example of how to create very basic conditional formatting rules.
Let's give another example. H ere, we will make the title or name of the item red and bold, italic and underlined. Select the item name control on the form.
We'll now go back to our format tab, click the conditional format, and create a new rule for that particular control, as shown in the screenshot above.
Here, we won't check the value of the current field we selected, but we'll check it with another field on this form. ve. utton, as shown in the screenshot above.
In the expression category, you have each object on this form. ate. OK. ow, click OK.
Now let's click OK, and then click OK again.
This is an example of conditional formatting on a field based on a value in another field.
Let's look at another example of conditional formatting. L et's assume that we want to see which projects are later or have later tasks than other late projects. Select the conditional format option.
Click the New Rules button to create a new rule, and then click OK, as shown in the screenshot above.
In the new formatting rule, we will now select a rule type, Compare with other records. in. e want our shortest bar to represent the lowest value and the longest bar to represent the highest value. L et's click OK now, then Apply, and then click OK again.
You can now see that conditional coloring is applied, as shown in the screenshot above. ow.