How to convert access memo field to text field in access query? How to convert a text field in an Access table to a rich text memo using VBA.
You can store rich, formatted text in an Access database by using a Long Text (also called Memo) field and setting the field's TextFormat property to RichText. For example, you can make the text bold or underlined, apply different fonts to individual words or characters, and change text colors. You can apply formatting to all or part of the contents of the field when the field is displayed in a datasheet and by editing the field through a bound control in a form or report.
In this article
What is rich text?
Rich text is text that is formatted with common formatting options, such as bold and italics, that are unavailable with plain text. You format your data by using common formatting tools, such as the Ribbon and the Mini Toolbar. Behind the scenes, Access applies Hypertext Markup Language (HTML) formatting code to your data. Access uses HTML because it provides a greater degree of compatibility with rich-text fields stored in SharePoint lists.
Access Sql Convert Number To Text
Access stores rich text by using the Long Text data type, which is the only data type that has built-in support for rich text. To create a field for storing rich text, you create a Long Text field and then set that field's TextFormat property to RichText. The two possible values are:
RichText Enables rich text and is stored and interpreted as rich HTML markup.
PlainText Enables plain text and is interpreted as plain text.
You set the TextFormat property for the Long Text field in table in Datasheet View and Design View. After you store rich text in a Long Text field, you can display it in a form or report by using a text box control. The text box control has a TextFormat property that inherits its initial value from the TextFormat property of the Long Text field. However, you can change the TextFormat property on the text box control.
The following table shows supported rich text formatting options:
Icon | Option | Description |
---|---|---|
Font name | Selects a different typeface. | |
Font size | Selects a font size. | |
Bold | Makes the selected text bold. If the text is already bold, removes the bold. | |
Italic | Makes the selected text italic. If the text is already italic, removes the italic. | |
Underline | Makes the text underlined. If the text is already underlined, removes the underline. | |
Align left | Aligns the text against the left margin. | |
Center | Centers the text within the margin. | |
Align right | Aligns the text against the right margin. | |
Numbering | Begins numbering paragraphs. The number appears prior to each paragraph. | |
Bullets | Begins placing a bullet before each paragraph. | |
Font color | Selects a font foreground color. | |
Text highlight color | Makes text look like it was marked with a highlighter pen. | |
Decrease indent | Decreases the paragraph indentation. | |
Increase indent | Increases the paragraph indentation. | |
Left-to-right | Fills control from left to right. | |
Right-to-left | Fills control from right to left. |
Create a rich text field
You can create a rich text field in table Datasheet View or Design View.
In Datasheet View
Open the table in Datasheet View.
Select Click to Add, and then select Long Text from the list.
Double click the field header and enter a meaningful name for the new field.
Save your changes.
In Design View
Open the table in Design View.
In the table design grid, locate the first empty row. Then, in the Field Name column, type a field name.
In the Data Type column, select Long Text.
Under Field Properties, click the General tab.
Click inside the Text Format box and select Rich Text.
Save your changes.
Change a field to rich text
Open the table that contains the field in Design View.
In the table design grid, click the Long Text field that you want to change to rich text.
Under Field Properties, click the General tab.
Click the Text Format box and select Rich Text.
Save your changes.
Change a rich text field to plain text
Important When you change a field from rich text to plain text, Access prompts you with a warning that all formatting will be removed. After you have applied the change to plain text and the table has been saved, you cannot undo the change.
Open the table that contains the field in Design View.
In the table design grid, click the Long Text field that you want to change to rich text.
Under Field Properties, click the General tab.
Click in the TextFormat box and select Plain Text.
Save your changes.
Clear the Append Only property
To enable rich text formatting for a field, ensure that the Append Only property for the field is disabled. Otherwise, Access hides the text in the field whenever you place your cursor in that field, or in any form or report controls bound to that field.
To disable the Append Only property
Open the table in Design View.
Select the Long Text field that you want to change, and in the lower part of the table designer, on the General tab, scroll down to the Append Only property.
Click the field next to the property and select No from the list.
Save your changes.
Enable rich text formatting for form and report controls
Access Query Convert To Text
If you use the commands on the Create tab to create a form or report, and you have enabled rich-text editing for the underlying Long Text field, the resulting text box control inherits the Text Format property set for the Long Text field. If you have data in the Long Text field of your table, that data appears in the text control on your form or report. However, Access does not enable rich text editing when you manually add a control to a form or report, even if you subsequently bind that control to a Long Text field with rich text formatting.
Convert Memo To Text
Open the form in Design View.
On the Design tab, in the Controls group, click Text Box.
In a blank area of your form, click and drag your mouse to draw the control.
Click the text area of the new control, right-click the text area of the control (not the label), and then click Properties.
In the property sheet for the new control, click the All tab.
Click the Control Source property box and select your Long Text field from the list.
By default, the list shows the fields in the table that is bound to your form. If your Long Text field resides in another table, use this expression syntax to bind the control: =[table name]![field name]. Use the brackets and exclamation point exactly as shown. Type the name of your table in the first part of the expression, and the name of your Long Text field in the second part. For example, if you have a table named Notes with a Long Text field named Compliments, you would enter this string in the Control Source property box: =[Notes]![Compliments]
In the property sheet, with the All tab still selected, locate and select the Text Format property box, and then select Rich Text from the list.
Save your changes.