TextBox object (Access)
This object represents a text box control on a form or report. Text boxes are used to display data from a record source, display the results of a calculation, or accept input from a user.
Remarks
Control | Tool |
---|---|
Text boxes can be either bound or unbound. You use a bound text box to display data from a particular field. You use an unbound text box to display the results of a calculation, or to accept input from a user (as in the following code example).
Example
The following code example uses a form with a text box to receive user input. The code displays a message when the user inputs data and then presses Enter.
Private Sub txtValue1_BeforeUpdate(Cancel As Integer)
MsgBox "The Text box is being updated."
End Sub
Events
- AfterUpdate
- BeforeUpdate
- Change
- Click
- DblClick
- Dirty
- Enter
- Exit
- GotFocus
- KeyDown
- KeyPress
- KeyUp
- LostFocus
- MouseDown
- MouseMove
- MouseUp
- Undo
Methods
Properties
- AddColon
- AfterUpdate
- AllowAutoCorrect
- Application
- AsianLineBreak
- AutoLabel
- AutoTab
- BackColor
- BackShade
- BackStyle
- BackThemeColorIndex
- BackTint
- BeforeUpdate
- BorderColor
- BorderShade
- BorderStyle
- BorderThemeColorIndex
- BorderTint
- BorderWidth
- BottomMargin
- BottomPadding
- CanGrow
- CanShrink
- ColumnHidden
- ColumnOrder
- ColumnWidth
- Controls
- ControlSource
- ControlTipText
- ControlType
- DecimalPlaces
- DefaultValue
- DisplayAsHyperlink
- DisplayWhen
- Enabled
- EnterKeyBehavior
- EventProcPrefix
- FilterLookup
- FontBold
- FontItalic
- FontName
- FontSize
- FontUnderline
- FontWeight
- ForeColor
- ForeShade
- ForeThemeColorIndex
- ForeTint
- Format
- FormatConditions
- FuriganaControl
- GridlineColor
- GridlineShade
- GridlineStyleBottom
- GridlineStyleLeft
- GridlineStyleRight
- GridlineStyleTop
- GridlineThemeColorIndex
- GridlineTint
- GridlineWidthBottom
- GridlineWidthLeft
- GridlineWidthRight
- GridlineWidthTop
- Height
- HelpContextId
- HideDuplicates
- HorizontalAnchor
- Hyperlink
- IMEHold
- IMEMode
- IMESentenceMode
- InputMask
- InSelection
- IsHyperlink
- IsVisible
- KeyboardLanguage
- LabelAlign
- LabelX
- LabelY
- Layout
- LayoutID
- Left
- LeftMargin
- LeftPadding
- LineSpacing
- Locked
- Name
- NumeralShapes
- OldBorderStyle
- OldValue
- OnChange
- OnClick
- OnDblClick
- OnDirty
- OnEnter
- OnExit
- OnGotFocus
- OnKeyDown
- OnKeyPress
- OnKeyUp
- OnLostFocus
- OnMouseDown
- OnMouseMove
- OnMouseUp
- OnUndo
- Parent
- PostalAddress
- Properties
- ReadingOrder
- RightMargin
- RightPadding
- RunningSum
- ScrollBarAlign
- ScrollBars
- Section
- SelLength
- SelStart
- SelText
- ShortcutMenuBar
- ShowDatePicker
- SmartTags
- SpecialEffect
- StatusBarText
- TabIndex
- TabStop
- Tag
- Text
- TextAlign
- TextFormat
- ThemeFontIndex
- Top
- TopMargin
- TopPadding
- ValidationRule
- ValidationText
- Value
- Vertical
- 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.