Format Property -- Text and Memo Data Types

Description

You can set the Format property to create custom formats for Text and Memo fields using special symbols.

Setting

The Format property uses the following symbols to define text and memo data types.

Symbol

Description

@

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 three sections. Each section contains the format specification for different data in a field.

Section

Description

First

Format for fields with text.

Second

Format for fields with zero-length strings.

Third

Format for fields with Null values.


If you specify only two sections, the second section refers to 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 enter the custom format @;"None";"Null" 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 in the field, the third section causes the word “Null” to appear when there is a Null value in the field.

Example

The following are examples of Text and Memo custom formats.

Setting

Data

Display

@@@-@@-@@@@

465043799

465-04-3799

@@@@@@@@@

465-04-3799

465-04-3799

>

davolio

DAVOLIO

<

davolio

davolio

@;;"Unknown"

Null value

Unknown

Zero-length string

Nothing is displayed

Any text

Same text as entered is displayed