Conditional Format in Combo box

  • Thread starter Claudette Hennessy
  • Start date
C

Claudette Hennessy

Has anyone successfully set the backcolor of a combo box based on values?
Thank you,
Claudette
 
K

Klatuu

You could use the After Update event to set the combo's backcolor based on
the current value. You could either use a Select Case statment to identify
the correct value, or with less code, you could add a column to your combo
that would have the backcolor value in it and use that to set the back color.
 
D

Douglas J. Steele

It's possible that Claudette wants different rows in the combo box to be
different colours. (i.e.: have the background Red behind values less than
10, have the background Yellow behind values between 10 and 20 and so on)

As far as I know, that's not possible (even for Stephen Lebans!)
 
L

Linq Adams via AccessMonster.com

Actually, you can use the Conditional Formatting dialog box to format the
combobox based on the selected value, as well as the AfterUpdate event, but I
suspect that Doug is corrrect in saying that she wants different rows to be
different colors.

I saw a post by Stephen Lebans adressing this a few years ago, in which he
said that it couldn't be done. If I remember correctly, his suggestion was
using a stripped down Continuous Form, doing the Conditional Formatting, then
using it as a subform, so that it appears as a Listbox, with the rows colored
appropriately. You could then use the click event to emulate the action of a
listbox.
 
C

Claudette Hennessy

Yes, different colors in different rows based on value is what I was
inquiring about. Thanks guys, will not try this one.
Claudette
 

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