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, 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.
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
-
Open the table in Datasheet view.
-
Click the column header Click to Add and select Memo.
-
Double-click the header row and enter a name for the new field.
Add a Memo field in between two fields
-
Right-click the column to the right of the position where you want to add the new Memo field and select Insert Field.
-
Select the field and click the Fields tab.
-
Click More Fields and select Memo .
-
Double-click the header row and enter a name for the new field.
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
-
In the Navigation Pane, right-click the table that you want to add the Memo field to and click Design View.
-
In the Field Name column of the designer, enter the name of Memo field. For example: "Address", "Notes" or "Comments".
-
Click the Data Type column next to the field name and choose Memofrom the list.
-
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
-
In the File tab, double-click Open.
-
In theOpen dialog box, select and open the database.
-
On the Create tab, in the Tables group, click Table.
-
Right-click the document tab for the new table and click Design View on the shortcut menu.
-
If the Save As dialog box appears, provide a name for your new table.
-
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.
-
Click the Data Type column next to the field name and choose Memo from the list.
-
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.
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
-
Open the database and in the Navigation Pane, double-click the table that you want to change.
-
Locate the Memo field, right-click the header row (the name), and click Delete Field.
-
Click Yes to confirm the deletion.
Delete a Memo field in Design view
-
Open the database and in the Navigation Pane, right-click the table that you want to change and click Design View.
-
Right-click the row selector (the blank square) next to the Memo field and click Delete Rows.
-
Click Yes to confirm the deletion.
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 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:
|
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 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:
|
Append Only | Determines whether to track field value changes. There are two settings:
Warning: Setting this property to No deletes any existing field value history. |
No comments:
Post a Comment