TextBox Object
TOC
Collapse the table of content
Expand the table of content

TextBox Object (Access)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

This object represents a text box control on a form or report. Text boxes are used to either display data from a record source, or to display the results of a calculation, or to accept input from a user.

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 Return


Private Sub txtValue1_BeforeUpdate(Cancel As Integer)

MsgBox "The Text box is being updated."

End Sub

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 code example above).

Control:

Tool:

t-txtbox_ZA06054010

textbox_ZA06044637

Show:
© 2016 Microsoft