Text

The Text control allows users to type in or view a single line of unformatted text. You can also make a Text control read-only to display the value of a particular field or if the control is part of a Subform control virtual join.

Example Text control

The benefits of a Text control are listed below.

  • You can make the control read-only to display data you do not want users to change, such as a record ID number.
  • RDBMS tools can typically query Text control fields as long as you map the field to a simple character data type in the back-end RDBMS.
  • Third-party reporting tools can typically read Text control fields as long as you map the field to a simple character data type in the back-end RDBMS.
  • The user does not have to apply any text formatting to the value typed.
  • If the control is editable, users can update the text value at any time.

The costs of a Text control are listed below.

  • The content of the control is displayed on one line of text. The database definition mapping of the fields determines the width of the line. For example, if the input field is mapped to a VARCHAR(255) column, then a user can only type 255 characters of text.
  • The control uses the character encoding of the back-end RDBMS to determine how to store character data. If users type in text using a character encoding that your system does not support, the data will likely become corrupted.
  • It is difficult to validate that users type in meaningful values into the control.
  • There is no way for users to format the text they type into the control.
  • The longer the width of the Text control the more form space the control requires.

In general, a Text control is best used in the following circumstances.

  • The user only needs to type in or view a single line of text.
  • You want the option to make the text read-only. For example, the text is a unique ID or part of a virtual join in a Subform control.
  • You do not need to format the text.

If you want users to type multiple lines of text, use a Text Area controls instead. If you want users to be able to format the text they type in, use an HTML Editor control instead.