Conditional Formatting using Unbound column of Combo Box

R

rob c

Can you tell me how to use the unbound column of a combo box in conditional
formatting?

I am working on a combo box called "cboname" which has two columns: 1) name;
and 2) ConfidenceHave. There is a combobox that is called "cboconfidence
needed".

I need for each row on the "cboname" combo which has a lower value in
"ConfidenceHave" than the value in "cboconfidenceneeded" for that record to
be in bold letters.

I tried to put [ConfidenceHave] < [cboconfidence needed] in the conditional
formatting using "Expression Is", but it doesn't work. I also tried
[ConfidenceHave] = 4, but that doesn't work either.

The bound column is "name", and needs to remain so.

Can you tell me how I can make this work?
 
A

Allen Browne

As you found, you cannot use a value from the non-bound column of a combo in
a conditional formatting expression.

The workaround will be to get that value into the form's RecordSource.
Typically the combo's RowSource is a little lookup table that has the values
you need. Create a query using the table you need for your form, and also
the combo's lookup table. Show the field you need from the lookup table as
well. Change your form's RecordSource property to refer to this query. You
now have the field you need for your CF expression.

Be sure to use an outer join between the 2 tables, so that any record where
the combo is null does not disappear from your form. More info about that
in:
The Query Lost My Records! (Nulls)
at:
http://allenbrowne.com/casu-02.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top