Solved Combo Box conditional formatting in Form (1 Viewer)

Dewayne Davis

New member
Local time
Today, 14:21
Joined
Jul 19, 2021
Messages
4
I am creating an access database to track our projects from the submittal stage to the material shipping stage. We are an Electrical Contractor.

I have created a query based on a table of materials quantity, type, part numbers, etc... to track where we are in the process.

I have created a form based on this query. I have a combo box to select the Status of each item of material, based on a lookup of a table named Status, via the same query.

I would like to have this control background to be formatted according to what is selected in this continuous form to make it easier to spot each item's status. For example, green if it has shipped, red if it hasn't, etc...

When I create an expression Expression is [Status}="Shipped" and format green background, nothing happens. I also tried Value="Shipped". Status is both the name of the control and the name of the column in the table, which is also called Status.

If I change to Expression is {Status}<>"Shipped", then all rows do turn green. So I don't think it is a problem with formatting. I think it is a problem with getting the correct value of the cell.

Any help would be appreciated.
 

Ranman256

Well-known member
Local time
Today, 15:21
Joined
Apr 9, 2015
Messages
4,339
use brackets (not braces): [Status]="Shipped"
 

June7

AWF VIP
Local time
Today, 11:21
Joined
Mar 9, 2014
Messages
5,423
Exactly what is value of combobox? Is it really an ID, not the descriptive text? So maybe: [Status]=1

Your narrative shows using { } characters and I think you meant [ ].
 

Dewayne Davis

New member
Local time
Today, 14:21
Joined
Jul 19, 2021
Messages
4
Exactly what is value of combobox? Is it really an ID, not the descriptive text? So maybe: [Status]=1

Your narrative shows using { } characters and I think you meant [ ].
That was it. I was using the value and not the ID. ID works perfect.
 

Users who are viewing this thread

Top Bottom