A Long Text field can be useful for storing large amounts of information, such as notes, comments, and descriptions. The Long Text data type stores up to 65,536 alphanumeric characters and supports rich text formatting, such as different colors, fonts, and highlighting.

What do you want to do?

Add a Long Text field in Datasheet view

You can add a Long Text field in Datasheet View.

Add to an existing table

  1. Open the table in Datasheet View.

  2. If necessary, scroll horizontally to the first blank field.

  3. Select Click to Add and then select Long Text from the list.

  4. Double-click the new header row, and then type a meaningful name for the new field.

  5. Save your changes.

Add to a new table

  1. On the Create tab, in the Tables group, click Table.

  2. Click Save, and in the Save As dialog box, enter a name for the new table.

  3. Select Click to Add and then select Long Text from the list.

  4. Double-click the new header row, and then type a meaningful name for the new field.

  5. Save your changes.

Top of Page

Add a Long Text field in Design view

You can add a Long Text field in Design View.

Add to an existing table

  1. Open the table in Design View.

  2.  In the Field Name column of the designer, enter the name of Long Text field. For example: “Address”, “Notes” or “Comments”.

  3. Click the Data Type column next to the field name and choose Long Text from the list.

  4. Save your changes.

Add to a new table

  1. On the Create tab, in the Tables group, click Table.

  2. Right-click the document tab for the new table and click Design View on the shortcut menu.

  3. If the Save As dialog box appears, provide a name for your new table.

  4. In the Field Name column, select the first blank row and enter a name for the field. Typically, names such as "Comments" or "Notes" are applied to a Long Text field.

  5. Click the Data Type column next to the field name and choose Long Text from the list.

  6. Save your changes.

If you bind a form or report text box to your Long Text field, you must also set the Text Format property for the text box to Rich Text.

Top of Page

Set or change Long Text field properties

You can use Datasheet View to set a subset of field properties, such as Is Required or Unique, but use Design View to set all available properties, including Input Mask or Caption.

  1. Open the table in Design View.

  2. On the General tab in the lower section of the table designer, under Field Properties, locate the property that you want to change.

  3. Select the field next to the property name. Depending on the property, you can enter data, start the Expression Builder by clicking Builder button, or select an option from a list.

    For information about how to use each field property, select the property and then press F1.

Top of Page

Delete a Long Text field

You can use either Datasheet View or Design View to remove a Long Text field from a table.

Important: When you delete a Long Text field that contains data, you lose that data permanently and you cannot undo the deletion. You should back up your database before you delete any table fields or other database components.

Delete in Datasheet view

  1. Open the table in Datasheet View.

  2. Locate the Long Text field, right-click the header row (the name), and click Delete Field.

  3. Click Yes to confirm the deletion.

Delete in Design view

  1. Open the table in Design View.

  2. Right-click the row selector (the blank square) next to the Long Text field and click Delete Rows.

  3. Click Yes to confirm the deletion.

Top of Page

Long Text field property reference

When you use Design view to add a Long Text field to a table, you can set and change a number of properties for the field. This table lists the Long Text field properties and describes what each one does, including the implications of setting or changing the properties.

Property

Usage

Format

Enter custom formatting characters to define a display format. Formats defined here appear in datasheets, forms, and reports.

Caption

Specifies the name of your Text field. Property accepts up to 2,048 characters. If you don't specify a caption, Access applies the default field name.

Default Value

Automatically assigns the specified value to this field when a new record is added. For example, if you specify a value such as "Enter up to 65 KB of text." Doing so would remind users that they can enter 255 characters.

Validation Rule

Specifies requirements for data entered into a record, field, or control. When you enter data that violates the rule defined for the field, you can use the Validation Text property to specify the resulting error message. Maximum length: 2,048 characters.

For more information about using validation rules, see the article Restrict data input by using a validation rule.

Validation Text

Specifies the text in the error message that appears when users violate a validation rule. For more information about creating validation rules, see the article Restrict data input by using a validation rule.

Required

When set to Yes, you must enter a value in the field, or in any controls bound to the field, and the value cannot be Null.

Allow Zero Length

When set to Yes, you can enter zero-length strings in a field. A zero-length string contains no characters, and you use them to indicate that you know no value exists for a field. You enter a zero-length string by typing two double quotation marks with no space between them ("").

Indexed

You can use indexes to speed up queries, sorting, and grouping operations run against large amounts of data. You can also use indexes to prevent users from entering duplicate information. Choices:

  • No:Turns off indexing (default)

  • Yes (Duplicates OK): Indexes the field and allows duplicate values. For example, you may have duplicate first and last names.

  • Yes (No Duplicates): Indexes the field and does not allow duplicate values.

Unicode Compression

Access uses Unicode to represent data in Short Text, Long Text, and Hyperlink fields. Unicode takes up more storage space because it uses 2 bytes per character instead of one. To help reduce file size, the default value of the Unicode Compression property for a Short Text, Long Text, or Hyperlink field is Yes. When set to Yes, any character whose first byte is 0 is compressed when it is stored and uncompressed when it is retrieved.

Data in a Long Text field is not compressed unless it requires 4,096 bytes or less of storage space after compression. As a result, the contents of a Long Text field might be compressed in one record, but might not be compressed in another record.

IME Mode

Specifies an Input Method Editor, a tool for using English versions of Access with files created in Japanese or Korean. Default value: No Control. For more information about using this property, press F1.

IME Sentence Mode

Specifies they type of data you can enter with an Input Method Editor. For more information about using this property, press F1.

Text Format

Enables or disables rich-text editing. Select Rich Text to enable rich-text editing.

If you enable rich-text editing for the field, and then bind a text box control to the field, you must also enable rich-text editing for the control.

For more information about formatting data as rich text, see Create or delete a Rich Text field.

Text Align

Specifies the alignment for data in a Long Text field. You have these choices:

  • General: Aligns text to the left, numbers and dates to the right

  • Left: Aligns all text, dates, and numbers to the left

  • Center: Centers all text, dates, and numbers

  • Right: Aligns all text, dates, and numbers to the right

  • Distribute: Justifies all text, dates, and numbers evenly against both sides of the field or text box

Append Only

Determines whether to track field value changes.

There are two settings:

  • Yes: Tracks changes. To view the field value history, right-click the field, and then click Show column history.

  • No: Does not track changes.

Warning    Setting this property to No deletes any existing field value history.

Top of Page

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.