Freigeben über


Format Property

Specifies the input and output formatting of a control's Value property. Available at design time and run time.

Control.Format[ = cFunction]

Property Values

  • cFunction
    Specifies the character constraints for data entry and formatting for display.

    The valid cFunction settings for an EditBox control are:

    Setting Description
    K Selects all the text when the control gets the focus.

    The valid cFunction settings for a Spinner control are:

    Setting Description
    $ Displays the currency symbol.
    ^ Displays numeric data using scientific notation.
    K Selects all the text when the control gets the focus.
    L Displays leading zeros (instead of spaces) in the text box.
    R Displays the format mask for the text box that is specified in the InputMask property. The mask formats data for easier entry and clearer display (for example, if the mask is 99-999, the number 12345 is displayed as 12-345), but is not stored as part of the data. Use only with character or numeric data.
    Z Displays the value as blank if it is 0, except when the control has the focus.

    The valid cFunction settings for a TextBox control and Column object are:

    Setting Description
    ! Converts alphabetic characters to uppercase. Use with Character data only.
    $ Displays the currency symbol. The ControlSource property must specify a numeric source for the text box.
    ^ Displays numeric data using scientific notation. The ControlSource property must specify a numeric source for the text box.
    A Allows alphabetic characters only (no spaces or punctuation marks).
    D Uses the current SET DATE format.
    E Edits Date values as British dates.
    K Selects all the text when the control gets the focus.
    L Displays leading zeros (instead of spaces) in the text box. The ControlSource property must specify a numeric source for the text box.
    M Included for backward compatibility.
    R Displays the format mask for the text box that is specified in the InputMask property. The mask formats data for easier entry and clearer display (for example, if the mask is 99-999, the number 12345 is displayed as 12-345), but is not stored as part of the data. Use only with character or numeric data.
    T Trims leading and trailing blanks from the input field.
    YS Displays Date values in a short date format determined by the Windows Control Panel short date setting.
    YL Displays Date values in a long date format determined by the Windows Control Panel long date setting.

Remarks

The Format property mimics the behavior of the FUNCTION clause for the @ ... GET and @ ... EDIT commands.

The Format property specifies a behavior for the entire input field. You can mix several Format codes, but they always affect everything in the input field. This property contrasts to the InputMask property in which each entry in the input mask corresponds to an entry in the input field.

See Also

DynamicInputMask Property | InputMask Property

Applies To: Column | ComboBox | EditBox | Spinner | TextBox