A label formatted with Special Effect set to Raised resembles a command
button. You can use the label's MouseDown event to set its SpecialEffect
property to sunken, and the MouseUp event to set it back to raised. You can
make it any color you want, and add any text you want. I still don't know
what the box does, but you can include in the Mouse Down and Mouse Up events
of the label code to set the box's special effect to whatever you want:
Me.boxMyBox.SpecialEffect = 2
(0 is flat, 1 is raised, 2 is sunken -- see VBA Help, SpecialEffect
Property)
Most controls can use a Click event. The disadvantages of using a label,
box, or other such control include that you can't tab to such a control, or
set the focus to it, or a number of other things that are possible with
command buttons. If you want the functionality of command buttons with
various formatting options then you will need to check out something like
the following:
http://www.lebans.com/cmdbutton.htm
Mark S via AccessMonster.com said:
I need the box so it looks like a button. The form has the appearance of a
Web page with the navigation buttons (boxes with labels combined) down the
left hand side of the form.
What is the box for? Could you just format the label as Raised, then have
the Mouse Down event be to format it as Sunken, then the Mouse Up event to
format it back to Raised?
Well I'm trying to use what is available to make the form attractive. I
thought about using an image and actually did, but the font used on the
[quoted text clipped - 6 lines]