Need to change the background color of a combo box

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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.
 
See:
http://www.lebans.com/cmdbutton.htm


CommandButton.zip is a database containing functions to allow a user
defined BackColor and Rotated Text for Command Buttons.

NEW - Jan. 26/2000 This version includes 2 functions. One for Form
Design view and one for Form View at Runtime.

1) Use API Color Dialog to select BackColor.

2) User Selectable degrees of rotation for Text in controls Caption.

3) Use in Form Design or Form View at Runtime.



--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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

Back
Top