Need to change the background color of a combo box

A

Arvin Meyer

Farooq Sheri said:
Is there an easy way to change the ComboBox background color.

It's a bit early, and my mind-reading powers haven't fully kicked in yet. It
depends upon where and how you want to change it. In Design View, select the
combo and change it's backcolor property either on the property sheet, or by
using the backfill button on the tool bar. For a single record in a
continuous form, go to Design View, select the combo box, and then select
the Format menu, then Conditional Formatting, and set the conditions under
which to change the color. If you need further help, post back with the
details of what you are trying to do.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
F

Farooq Sheri

Sorry. But it seems that I too was dozing at the time I was writing my
original post. I want to change the background color of a command button and
not that of a combo button (that's easy).

Thanks
 
K

Ken Snell [MVP]

You can't change the background color of a command button. You can use a
"trick" to simulate this if you put a colored label behind a transparent
button (set the Special Effects of the label to Raised), although this won't
show the "depressing of the button" when you click it. It's also possible to
have the label change its Special Effect to Sunken using its MouseDown
event, and change back to Raised using its MouseUp event, but the
"depressing" effect is just slightly different than the way a command button
"depresses" when clicked.

Note that, if you use the second method, you can forgo the transparent
command button and just use the label's Click event to run the code that
normally would run in the button's Click event.
 

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