Share via


DisplayFormat Property

DisplayFormat property as it applies to the ListFieldChoice object.

FpChoiceFieldFormat

FpChoiceFieldFormat can be one of these FpChoiceFieldFormat constants.
fpChoiceFieldDropdown
fpChoiceFieldRadioButtons

expression.DisplayFormat

*expression   * Required. An expression that returns a ListFieldChoice object.

DisplayFormat property as it applies to the ListFieldDateTime object.

FpDateTimeFieldFormat

FpDateTimeFieldFormat can be one of these FpDateTimeFieldFormat constants.
fpDateTimeFieldDateAndTime
fpDateTimeFieldDateOnly
fpDateTimeFieldTimeOnly

expression.DisplayFormat

*expression   * Required. An expression that returns a ListFieldDateTime object.

DisplayFormat property as it applies to the ListFieldNumber object.

FpNumberFieldFormat

FpNumberFieldFormat can be one of these FpNumberFieldFormat constants.
fpNumberFieldAuto The number will be automatically formatted.
fpNumberFieldFiveDecimals The number will be displayed with five decimal places.
fpNumberFieldFourDecimals The number will be displayed with four decimal places.
fpNumberFieldInteger The number will be displayed as an integer with no decimal places.
fpNumberFieldOneDecimal The number will be displayed with one decimal place.
fpNumberFieldThreeDecimals The number will be displayed with three decimal places.
fpNumberFieldTwoDecimals The number will be displayed with two decimal places.

expression.DisplayFormat

*expression   * Required. An expression that returns a ListFieldNumber object.

DisplayFormat property as it applies to the ListFieldURL object.

FpURLFieldFormat

FpURLFieldFormat can be one of these FpURLFieldFormat constants.
fpURLFieldImage
fpURLFieldLink

expression.DisplayFormat

*expression   * Required. An expression that returns a ListFieldURL object.

Example

As it applies to the ListFieldChoice object.

The following example changes the display type of a field named NewChoiceField in the first list of the active Web site. The choices will now be displayed in a drop-down list.

Sub ChangeViewFormat()
'Change the display type of the field

    Dim objApp As FrontPage.Application
    Dim objListFields As ListFields
    Dim objListField As ListFieldChoice

    Set objApp = FrontPage.Application
    Set objListFields = objApp.ActiveWeb.Lists.Item(0).Fields
    Set objListField = objListFields.Item("NewChoiceField")
    'Change display format to DropDown list
    objListField.DisplayFormat = fpChoiceFieldDropdown

End Sub

Applies to | ListFieldChoice Object | ListFieldCurrency Object | ListFieldDateTime Object | ListFieldNumber Object | ListFieldURL Object

See Also | AddChoice Method | Choices Property | RemoveChoice Method