DisplayForm Property

Microsoft FrontPage Visual Basic

DisplayForm Property

Returns or sets a String that represents the relative URL of the form that contains the user interface associated with the list. Read/write.

expression.DisplayForm

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The following example displays the names of all lists in the active Web site and the relative URLs of their associated Web forms.

    Sub ViewFormURL()
'Displays the URL of the form
'associated with the list

    Dim lstWebList As List
    Dim strURL As String

    If Not ActiveWeb.Lists Is Nothing Then
        'Cycle through lists and add URLs to string
        For Each lstWebList In ActiveWeb.Lists
            If strURL = "" Then
                strURL = lstWebList.Name & "  -  " & _
                lstWebList.DisplayForm & vbCr
            Else
                strURL = strURL & lstWebList.Name & "  -  " & _
                lstWebList.DisplayForm & vbCr
            End If
        Next
        'Display URLs of all forms in Web site
        MsgBox "The relative URLs of the forms are:" _
               & vbCr & vbCr & strURL
    Else
        'Otherwise display message to user
        MsgBox "The current Web site contains no lists."
    End If

End Sub