I can't say I follow what you're doing, but maybe you could set the
forecolor to match the backcolor. However, I expect you would still see
the
text when you click into the combo box.
You mention the After Update event. Is that for the combo box? If so,
are
you selecting a color name from the combo box for the express purpose of
changing the combo box backcolor? If so, what is supposed to happen when
you go to another record?
BTW, Value is the default property for a combo box, text box, etc., so you
don't need to specify it. Also, If IsNull is enough of a test; you don't
need to check whether it's true:
Me.Combo56.BackColor = IIf(IsNull(Me.Combo56), 15066597,
Switch(Me.Combo56 = "Green", 65280,
Me.Combo56 = "Yellow", 65535,
Me.Combo56 = "Red", 255,
Me.Combo56 = "Blue", 16737843,
Me.Combo56 = "Orange", 5220351))
There's no harm to doing it the way you did, but it is easier to read and
evaluate if it is pared down to the essentials.
"Joe" <Joe@[EMAIL PROTECTED]
> wrote in message
news:850B3184-AB35-4A86-A3D1-2547A03CA70B@[EMAIL PROTECTED]
> Sorry, Doug. I am trying to get the background color to change when
> selected
> from the drop down without the name of the color showing like the result
> achieved when conditional formatting is used. This purely cosmetic and I
> can
> live with what I am getting now if my question/query does not make
sense.
>
>
> "Douglas J. Steele" wrote:
>
>> I'm not sure I understand what you mean by "have a black text that
shows
>> trough the color background". The code changes the back colour only,
not
>> the
>> text colour.
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "Joe" <Joe@[EMAIL PROTECTED]
> wrote in message
>> news:76E3E818-5DBA-46F9-81B9-EDEB205B7750@[EMAIL PROTECTED]
>> > This is message is being posted for code evaluation/correction to a
>> > problem
>> > for which a partial solution was provided by "Klatuu". Any insight
from
>> > the
>> > "MVPs" or anyone with a solution will be greatly appreciated. I am
not
>> > a
>> > code
>> > expert so a simple suggestion/solution specific to the solution will
be
>> > most
>> > useful.
>> >
>> > The code below changes the background color of a drop down menu
choices
>> > when
>> > placed in the After Update code section. However, the last two
colors,
>> > "Blue"
>> > and Orange" have a black text that shows trough the color background.
>> > Why?
>> >
>> >
>> > Me.Combo56.BackColor = IIf(IsNull(Me.Combo56.Value) = True, 15066597,
>> > Switch(Me.Combo56.Value = "Green", 65280, Me.Combo56.Value =
"Yellow",
>> > 65535,
>> > Me.Combo56.Value = "Red", 255, Me.Combo56.Value = "Blue", 16737843,
>> > Me.Combo56.Value = "Orange", 5220351))
>> >
>> >
>> >
>>
>>
>>


|