Use a Memo field to store large amounts of information

A Memo field can be useful for storing large amounts alphanumeric information. Some typical uses for this data type would be a note, comments, description, or address field, The Memo data type allows up to 65,536 alphanumeric characters with options to set several properties such as rich text formatting. When using the Memo data type in a Web database, values that contain more than 8,192 characters are truncated.

This topic explains how to add a memo field to tables in a new or existing Microsoft Access 2010 to client database.

What do you want to do?


Understand the Memo data type

If you are new to Access, remember that the data in a database is stored in one or more tables. You may use different views to display the data such as, a Datasheet view (Datasheet view: A view that displays data from a table, form, query, view, or stored procedure in a row-and-column format. In Datasheet view, you can edit fields, add and delete data, and search for data.), a form, or a report. Each table consists of a set of fields (columns), and each field property is set to accept one specific data type. For example, to store dates and times set the field property to the Date/Time data type. You can enter large amounts of text and numeric data in the Memo field. Also, if the database designer sets the field to support rich text formatting, you can apply the types of formatting that you normally find in word processing programs, such as Word. For example, you can apply different fonts and font sizes to specific characters in your text, and make them bold or italic, and so on. You can also add Hypertext Markup Language (HTML) tags to the data. For more information on setting a table’s property, see Introduction to tables.

Memo field specifications

Memo fields in Access 2010 can store up to 1 gigabyte of characters, or 2 gigabytes of storage (2 bytes per character), of which you can display 65,535 characters in a text box control on a form or report. In addition, you can now apply rich-text formatting to the data in a Memo field. For example, you can set colors, change fonts, and make data bold or italic.

Ways to add a Memo field

Access provides several ways to add a Memo field to a new or existing table. You can add the field from either Datasheet view or Design view of a new or existing table in your Access database. When you use Design view to add a Memo field, you can also set several field properties such as rich-text format, a lookup value list. For more information about the properties that you can set for a Memo field, see the section Memo field property reference.

Top of Page Top of Page

Add a Memo field in Datasheet view

The following steps explain how to place a new Memo field in a table from Datasheet View.

Add a Memo field at the end of a table

  1. Open the table in Datasheet view.
  2. Click the column header Click to Add and select Memo.
  3. Double-click the header row and enter a name for the new field.

insert a new field in a table

Add a Memo field in between two fields

  1. Right-click the column to the right of the position where you want to add the new Memo field and select Insert Field.
  2. Select the field and click the Fields tab.
  3. Click More Fields and select Memo.
  4. Double-click the header row and enter a name for the new field.

locate the Memo field data type under more fields

Top of Page Top of Page

Add a Memo field in Design view

You can also use Design view to add a Memo field to a new or existing table. In contrast to Datasheet view, Design view lets you control every field and property in a table. The steps in this section explain how to add a Memo field to existing and new tables, and how to set the Memo field for rich-text editing.

Add a Memo field to an existing table

  1. In the Navigation Pane, right-click the table that you want to add the Memo field to and click Design View.
  2.  In the Field Name column of the designer, enter the name of Memo field. For example: “Address”, “Notes” or “Comments”.
  3. Click the Data Type column next to the field name and choose Memo from the list.

add a new fieldto a table from design view

  1. Save your changes.

 Note    Use the Field Properties pane to set properties for individual fields. For example, you can use the pane to change the Text format to Rich Text or to change the values in a lookup field.

Add a Memo field to a new table

  1. In the File tab, double-click Open.
  2. In the Open dialog box, select and open the database.
  3. On the Create tab, in the Tables group, click Table.
  4. Right-click the document tab for the new table and click Design View on the shortcut menu.
  5. If the Save As dialog box appears, provide a name for your new table.
  6. 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 Memo field.
  7. Click the Data Type column next to the field name and choose Memo from the list.
  8. Save your changes.

 Tip    Use the Field Properties pane to set properties for individual fields. For example, you can use the pane to change the Text format to Rich Text or to change the values in a lookup field.

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

For more information about formatting data as rich text, see Enter or edit data in a control or column that supports rich text.

Top of Page Top of Page

Delete a Memo field

You can use either Datasheet view or Design view to remove a Memo field from a table.

 Warning   

When you delete a Memo 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 a Memo field in Datasheet view

  1. Open the database and in the Navigation Pane, double-click the table that you want to change.
  2. Locate the Memo field, right-click the header row (the name), and click Delete Field.
  3. Click Yes to confirm the deletion.

Delete a Memo field in Design view

  1. Open the database and in the Navigation Pane, right-click the table that you want to change and click Design View.
  2. Right-click the row selector (the blank square) next to the Memo field and click Delete Rows.
  3. Click Yes to confirm the deletion.

Top of Page Top of Page

Memo field property reference

When you use Design view to add a Memo field to a table, you can set and change a number of properties for the field. This table lists the Memo 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 Create a validation rule to validate data in a field.
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 Text, Memo, 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 Text, Memo, 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 Memo field is not compressed unless it requires 4,096 bytes or less of storage space after compression. As a result, the contents of a Memo 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.
Smart Tags

Specify one or more Smart Tags for the field and any controls bound to the field. Smart Tags are components that recognize the types of data in a field and allow you to take action based on that type. For example, in an E-mail Address field, a Smart Tag can start a new mail message or add the address to a list of contacts.

Click Button image to see a list of available Smart Tags.

Text Format

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

 Note    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.

Text Align

Specifies the alignment for data in a Memo 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 Top of Page

 
 
Applies to:
Access 2010