Click on your first square 'SV1', then on the menu bar, select ‘Format’ then ‘Conditional Formatting’ (Microsoft Access 2003 or earlier). For Access 2007 or later you will find the conditional formatting button on the 'Design' ribbon, it is now just called 'Conditional'. The conditional formatting. Highlight Current Record with Conditional Formatting and VBA in Microsoft Access Also create a control to keep track of the primary key (PK), and a control to change color (for continuous or multiple items form) Download Download Access database (accdb) example with form that shows the active record highlighted in yellow. Under the Format menu, select 'Conditional Formatting'. A Conditional Formatting window should appear. Under the condition 1 drop-down box, select 'Field Has Focus' and then choose the formatting conditions that you want to apply when the field has focus. In this example, we selected the 'paint can' icon and selected blue as the background color. Use conditional formatting in Access forms and reports. Open the report in Design view. Select the date field. In this case, that's the Due Date field. Click the contextual Format tab. Click Conditional Formatting in the Control Formatting group. In the resulting dialog, click New Rule. For example, lets say I have the following fields. The DAYSOPEN field is automatically calculated in the query and is not a stored date. My criteria is that if CAT# is 3, my days open should not exceed 30 but if my CAT# is 1 or 2, my days open should not exceed 60.
Wes Preston (@idubbs) originally published this article on his blog, and we thought it was worth sharing here. Enjoy!
*Disclaimer* – This post based on Preview version of PowerApps. I’ll make every effort to update with any changes and verify when PowerApps is released.
So far, I’m LOVING the potential that PowerApps brings to the table for power users. Coming from the SharePoint side of the world, lots of folks are going to be interested in how conditional formatting works within PowerApps. Here is one example – I’m sure there will be more.
The formatting is implemented using a formula on the Color property of the control.
If the value being checked is ‘High’, then make the Color red. If not, then make the color Black.
I have a Display form.
The ‘Priority’ field that I’m checking the value of is on card: DataCard6
With this information, I can change any of the Color properties for other controls to:
If(DataCard6.Default.Value=”High”, Red, Black)
Note: for the card of the Priority field, I can alternatively use the following:
If(Parent.Default.Value=”High”, Red, Black)
On the Browse screen, we access the data a little differently, so it looks like this:
If(Priority.Value=”High”, Red, Black)
Regarding multiple values, like typical KPI (key performance indicator) examples – Red, Yellow, Green for example – you need to nest the formula logic like this:
If(ReqType.Value=”Type1″, Red, If(ReqType.Value=”Type2″, Yellow, If(ReqType.Value=”Type3″, Green, Black)))
(Yellow, by the way, looks terrible on a white background. )
Think of it as an ElseIf kind of construct by filling in the ElseResult (as mentioned in the IF reference below). Download java program code examples freebackuptype.
It’s a bit of a learning curve for PowerApps with all the new terms, different ways of referencing data, etc. but Microsoft has done a great job with initial documentation, examples, etc. Some of the links below will get you started poking around.
Microsoft Access Conditional Formatting Expression Examples
Getting started with formulas (PowerApps Reference)
If function in PowerApps (PowerApps Reference)
Understand data forms (PowerApps Reference)