The simple answer is no!. But, there is always another way with Access or VB.
You can create a command button and set its Transparent property to Yes. Then Place a label on top of the command button and make it the same shape as the command button - you have to play with it to make the caption work well. Set the color the way you want then go into the code behind the form:
Place this code:
Private sub lblCmdButton_MouseDown(Button as Integer, Shift as integer, X as single, Y as single)
Select Case Button
Case acLeftButton
Me.lblCmdButton.SpecialEffect = 2 'For the sunken effect
Case acRightButton
Me.lblCmdButton.SpecialEffect = 1 'To keep it raised
end select
end sub
Private sub lblCmdButton_MouseUp(Button as Integer, Shift as integer, X as single, Y as single)
Select Case Button
Case acLeftButton
Me.lblCmdButton.SpecialEffect = 1'For the sunken effect
Case acRightButton
Me.lblCmdButton.SpecialEffect = 1 'To keep it raised
end select
end sub
You have to play with it, but it does give you some control over how a button is presented. It ain't perfect, but what is?
I've done something similar to rbowes, but instead all I use is two labels. First you make two labels, make one blank (your button, let's call it lblButton) and have the other with your "button" text (let's call it lblCaption). Size the caption to just big enough to see the text. Now in the mouse down of each (lblButton and lblCaption place this code:
[tt]
lblCommand.SpecialEffect = 2 'sets sunken effect on button
lblCaption.BorderStyle = 4 'puts dotted border around caption
[/tt]
Then you just place the code you want to run when your "button" is clicked in the OnClick event of both the caption and the "button". Hope that helps!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.