Share via


Fields Tab, Table Designer

The Table tab displays slightly different information depending on whether you open a database table or a free table. If you are creating a database table, the Field tab includes options for setting validation rules. If you are creating a free table, the tab contains only basic field name, type, and formatting options.

The tab displays table fields in a scrollable grid. Each row contains the field's name, data type, character width, decimal width, and support for null values. Click a cell in the grid to modify a field.

  • Mover Button
    This is the double-headed arrow button at the extreme left of the row. Once you have entered two or more rows, use the mover button to move a row up or down in the list.
  • Name
    Specifies the name of the field. Spaces are not accepted. For database tables, the length of the name can be up to 128 characters. For more information, see Creating Visual FoxPro Names.
  • Type
    Specifies the field's data type. Click the drop-down arrow to select a data type from the list.
  • Width
    Specifies the number of characters or digits the field can store.
  • Decimal
    Specifies the number of digits to the right of the decimal point. The Decimal column applies to numeric and double data types.
  • Index
    Specifies a regular index on the field for ordering the data.
  • NULL
    When checked, specifies that the field can accept a null value.
  • Insert Button
    Inserts a new field above the selected field.
  • Delete Button
    Deletes the selected field from the table.

Field Validation

If you are modifying a database table, the Field Properties option group appears below the scrollable grid.

Properties settings for the selected field are specified in this area. Choose the dialog button to the right of each property setting to display the Expression Builder Dialog Box, or just type the expression directly. Entries for these options are not required.

  • Rule
    Specifies the field-level rule for enforcing data validation.
  • Message
    Specifies the error message to be displayed if an entry violates the field-level validation rule.
  • Default Value
    Specifies the default value for the field.

Map Field Type to Classes

To specify a default control class, set the library and class you want to create when you drag the field onto a form.

  • Display Library
    Specifies the path and file name for the class library. To browse for a file, use the dialog button.
  • Display Class
    Specifies the default control class for the field.

Display

Specifies the format properties for entering and displaying the field.

  • Format
    Specifies the expression for case, size, and style for display of the field in the Browse window, forms, or reports. Property settings within the form and report can override this expression.
  • Input Mask
    Specifies the format for values as they are entered into the field. For example, telephone numbers might have a format of (999) 999-9999.
  • Caption
    Specifies the label that appears for the field in the Browse window, forms, or reports. Property settings within the form or report can override this setting.
  • Field Comment
    Provides a space to enter notes about the field.

See Also

Expression Builder Dialog Box | Indexes Tab, Table Designer | Table Wizard | Creating Visual FoxPro Names | Table Designer