title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
CommandButton object (Access) |
vbaac10.chm10554 |
|
|
25e7c0b7-03c1-dffe-8f52-4ec59739f6b8 |
03/05/2019 |
medium |
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.
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.
- 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
[!includeSupport and feedback]