is it possible to add conditional formatting to the records of a combo box (so those records that meet a specific condition are displayed differently)?
many thanks in advance,
Mark
is it possible to add conditional formatting to the records of a combo box (so those records that meet a specific condition are displayed differently)?
many thanks in advance,
Mark
Not sure exactly what you mean! If one of your selections for the combobox is meat, how would you like it displayed and where? I'm assuming this will be done via your query for the combobox.
it would be like this:
if the data source from a table was
- chop meat
- meat
- expensive meat
and in that table was a logical field call [premium_pricing_Y/N]
...I've been asked if the list in the combo box could somehow visually flag any of the items that tested TRUE for [premium_pricing_Y/N]
Alternately, I could add a field to the combo that read like this
=iif([premium_pricing_Y/N],"$$$", "")
but graphically (since my actual project has nothing to do with meat ... it's only that I haven't yet eaten lunch, and I'm hungry -LOL), a more graphical approach would make more sense...
Conditionally Formatting for a Combobox only applies to the selected Value after it has been selected. You cannot format individual selections/rows when the cbo is dropped down, which sounds like what you're asking.
The usual workaround, if something like this is just 'has to be done,' is to use a small Datasheet View Form to simulate a Listbox, and use Conditional Formatting to to change BackColor/FontColor on Columns to indicate whatever. You can then use Double-Clicking on one or more Columns to indicate the 'selected' value and do whatever you want to with the selection.
I've got to tell you that this is involves a lot of work, with you having to custom code a lot of things that a Combobox does more or less automatically, and you really need to look at whether the result is worth all the labor that is going to be involved.
Linq ;0)>
exactly what I needed to know
(and exactly what I was expecting to hear -although I do admit that the details of the work-around had yet to reveal themselves to me....!!!)
thnx,
Mark