Table of contents
TOC
Collapse the table of content
Expand the table of content

Format Property - Text and Memo Data Types

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Applies to: Access 2013 | Access 2016

You can use special symbols in the setting for the Format property to create custom formats for Text and Memo fields.

Setting

You can create custom text and memo formats by using the following symbols.

SymbolDescription
@Text character (either a character or a space) is required.
&;Text character is not required.
<Force all characters to lowercase.
>Force all characters to uppercase.

Custom formats for Text and Memo fields can have up to two sections. Each section contains the format specification for different data in a field.

SectionDescription
FirstFormat for fields with text.
SecondFormat for fields with zero-length strings and Null values.

For example, if you have a text box control in which you want the word "None" to appear when there is no string in the field, you could type the custom format @;"None" as the control's Format property setting. The @ symbol causes the text from the field to be displayed; the second section causes the word "None" to appear when there is a zero-length string or Null value in the field.

Note You can use the Format function to return one value for a zero-length string and another for a Null value, and you can similarly use the Format property to automatically format fields in table Datasheet view or controls on a form or report.

Example

The following are examples of text and memo custom formats.

SettingDataDisplay
@@@-@@-@@@@465043799465-04-3799
@@@@@@@@@465-04-3799 465043799465-04-3799 465043799
>davolio DAVOLIO DavolioDAVOLIO DAVOLIO DAVOLIO
<davolio DAVOLIO Davoliodavolio davolio davolio
@;"Unknown"Null valueUnknown
Zero-length stringUnknown
Any textSame text as entered is displayed

ACCESS SUPPORT RESOURCES
Access for developers forum on MSDN
Access help on support.office.com
Access help on answers.microsoft.com
Search for specific Access error codes on Bing
Access forums on UtterAccess
Access wiki on UtterAcess
Access developer and VBA programming help center (FMS)
Access posts on StackOverflow

© 2018 Microsoft