Combo Box conditional formatting in Form (1 Viewer)

Dewayne Davis

New member
Local time
Today, 03:32
Joined
Jul 19, 2021
Messages
3
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, 04:32
Joined
Apr 9, 2015
Messages
3,915
use brackets (not braces): [Status]="Shipped"
 

June7

AWF VIP
Local time
Today, 00:32
Joined
Mar 9, 2014
Messages
3,622
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, 03:32
Joined
Jul 19, 2021
Messages
3
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