Earlier this week, I discovered how to format a whole row in Microsoft Excel based on the value of one of its component cells. Then yesterday I tried to apply this to Access and it became clear that the conditional formatting options in the database lag a little behind its spreadsheet cousin. There’s no such thing as applying formatting based on a formula.
However, this was a good opportunity to apply some programmer’s thinking. You can’t colour the background but you can colour a data-holding field. Furthermore, you can get that data field to pick a colour based on the value in another field in the same record. What I realised was that I could create an “unbound” field, resize it to cover the whole area, send it to sit at the back of the stack of fields and colour that.
C’est voila! I can now create the same visual effect as in Excel, even if the route to get there is somewhat different.