The subroutine SetFieldApp receives a field name and its properties as parameters, and assigns the properties to the field.

The subroutine assigns the following field properties: field visibility, whether the field is required, the number of the page (tab) on which the field should be displayed, and the view order (from left to right and from top to bottom).

Add a call to the subroutine SetFieldApp in the user-defined function FieldCust_AddDefect. For details on this function, see FieldCust_AddDefect.

Sub SetFieldApp(FieldName, Vis, Req, PNo, VOrder)
    On Error Resume Next
    With Bug_Fields(FieldName)
        .IsVisible = Vis
        .IsRequired = Req
        .PageNo = PNo
        .ViewOrder = VOrder
    End With
    PrintError "SetFieldApp"
    On Error GoTo 0
End Sub