Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Boxes on forms

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
Anyone know how to change the background colour of an item when highlighted in a combo box on a form
 
Only through windows own customisation settings so far as I'm aware :(

There are most likely some funky custom control available but I don't reckon the standard one is that flexible. Hopefully for you, I'm wrong but if it's certainly not one of those simple things.

JB
 
You can change the color of the whole box with a little VBA code in the OnGotFocus and OnLostFocus events. If your combo box is named MyCombo then in the OnGotFocus put:

MyCombo.BackColor = vbYellow ' or whatever color

in the OnLostFocus event put:

MyCombo.BackColor = vbWhite

Or you can use Access colors like you see in the property sheets (numbers).

Now, if you want to customize the color just a SPECIFIC list item in the box, you got me... but Access does that ANYWAY when you click on it!

:)


Richard Rost
Access Instructor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top