CommandButton object (Access)
This object corresponds to a command button. A command button on a form can start an action or a set of actions. For example, you could create a command button that opens another form. To make a command button do something, you write a macro or event procedure and attach it to the button's OnClick property.
Remarks
Control | Tool |
---|---|
You can display text on a command button by setting its Caption property, or you can display a picture by setting its Picture property.
Note
You can create over 30 different types of command buttons with the Command Button Wizard. When you use the Command Button Wizard, Microsoft Access creates the button and the event procedure for you.
Events
Methods
Properties
- AddColon
- Alignment
- Application
- AutoLabel
- AutoRepeat
- BackColor
- BackShade
- BackStyle
- BackThemeColorIndex
- BackTint
- Bevel
- BorderColor
- BorderShade
- BorderStyle
- BorderThemeColorIndex
- BorderTint
- BorderWidth
- BottomPadding
- Cancel
- Caption
- Controls
- ControlTipText
- ControlType
- CursorOnHover
- Default
- DisplayWhen
- Enabled
- EventProcPrefix
- FontBold
- FontItalic
- FontName
- FontSize
- FontUnderline
- FontWeight
- ForeColor
- ForeShade
- ForeThemeColorIndex
- ForeTint
- Glow
- Gradient
- GridlineColor
- GridlineShade
- GridlineStyleBottom
- GridlineStyleLeft
- GridlineStyleRight
- GridlineStyleTop
- GridlineThemeColorIndex
- GridlineTint
- GridlineWidthBottom
- GridlineWidthLeft
- GridlineWidthRight
- GridlineWidthTop
- Height
- HelpContextId
- HorizontalAnchor
- HoverColor
- HoverForeColor
- HoverForeShade
- HoverForeThemeColorIndex
- HoverForeTint
- HoverShade
- HoverThemeColorIndex
- HoverTint
- Hyperlink
- HyperlinkAddress
- HyperlinkSubAddress
- InSelection
- IsVisible
- LabelAlign
- LabelX
- LabelY
- Layout
- LayoutID
- Left
- LeftPadding
- Name
- ObjectPalette
- OldValue
- OnClick
- OnDblClick
- OnEnter
- OnExit
- OnGotFocus
- OnKeyDown
- OnKeyPress
- OnKeyUp
- OnLostFocus
- OnMouseDown
- OnMouseMove
- OnMouseUp
- OnPush
- Parent
- Picture
- PictureCaptionArrangement
- PictureData
- PictureType
- PressedColor
- PressedForeColor
- PressedForeShade
- PressedForeThemeColorIndex
- PressedForeTint
- PressedShade
- PressedThemeColorIndex
- PressedTint
- Properties
- QuickStyle
- QuickStyleMask
- ReadingOrder
- RightPadding
- Section
- Shadow
- Shape
- ShortcutMenuBar
- SoftEdges
- StatusBarText
- TabIndex
- TabStop
- Tag
- ThemeFontIndex
- Top
- TopPadding
- Transparent
- UseTheme
- VerticalAnchor
- Visible
- Width
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.