I know this should be simple, but I can't change the background color of command buttons on a new form. They are gray and can't be changed. The "fill/back color" icon is grayed out too. What might I be doing wrong?
your doing nothing wrong - you cant change the bg of a button
you can use a clickable label instead, that does the same or similar thing, and with more control - labels have a funny rollover effect when used on a tab control, otherwise they look fine
i think there are windows api ways of messing with command button bgs though - have a search, i even saw a demo using mouse rollovers on labels with no click events at all!
Another thing you can do is go to TOOLS=>OPTIONS and then the Form tab and check the Use Window Themed controls. This will change the apperence of you controls.
Another thing you can do is go to TOOLS=>OPTIONS and then the Form tab and check the Use Window Themed controls. This will change the apperence of you controls.
That option isn't available in 2000 (just as an FYI) so if using 2000, or earlier, that won't work.
The command buttons are a windows controled thing and the user's settings determine the color. They can change it themselves, but you have to kind of create your own with labels, as mentioned by Gemma.
Thought about the using label instead, but that doesn't give me the luxury of the command button wizard does it? I really need that part too. Thanks for the suggestions anyway!!
You could use the wizard to create a button, then create you label and copy the code in the buttons Click_Event to the the labels Click_Event. But really anything you can do with the Wizard is just on of the Docmd methods
Thought about the using label instead, but that doesn't give me the luxury of the command button wizard does it? I really need that part too. Thanks for the suggestions anyway!!
Use the command button wizard, to create the code for you and then create your other label and then copy the code to the label's click event (changing the appropriate names of course) and delete the command button.
If using a label as a button make sure you show borders or use a On Mouse move effect. Here is a sample one you might like...
Code:
Public Sub ButtonOver(CtlName As String)
If Not (Me.Controls(CtlName).SpecialEffect > 0) Then
Call ResetButtons
Me.Controls(CtlName).SpecialEffect = 3
bButtonsReset = False
End If
End Sub