Working with Table Properties

In addition to field properties, you can specify properties that apply to a table as a whole. To access the table properties, you click the Properties button on the toolbar while in a table's Design view. The available table properties are shown in Figure 14.9.

Figure 14.9. Viewing the available table properties.


The Description property is used mainly for documentation purposes. The Default View property designates the view in which the table appears when the user first opens it. The Validation Rule property specifies validations that must occur at a record level instead of a field level. For example, credit limits might differ depending on what state a customer is in. In that case, what's entered in one field depends on the value in another field. If you enter a table-level validation rule, it doesn't matter in what order the user enters the data. A table-level validation rule ensures that Access enforces the proper dependency between fields. The validation rule might look something like this:

[State] In ("CA","NY") And [CreditLimit]<=2500 Or _
    [State] In ("MA","AZ") And [CreditLimit]<=3500 Or _
    [State] Not In ("CA", "NY", "MA", "AZ")

This validation rule requires a credit limit of $2,500 or less for applicants in California and New York and a limit of $3,500 or less for applicants in Massachusetts and Arizona, but it doesn't specify a credit limit for residents of any other states. Table-level validation rules can't be in conflict with field-level validation rules. If they are in conflict, you will not be able to enter data into the table.

The Validation Text property determines what message appears when a user violates the validation rule. If this property is left blank, a default message appears.

The Filter property is used to indicate a subset of records that appears in a datasheet, form, or query. The Order By property is used to specify a default order for the records. The Filter and Order By properties aren't generally applied as properties of a table.

The Subdatasheet Name property identifies the name of a table that is used as a drill-down. If this property is set to [Auto], Access automatically detects the drill-down table, based on relationships established in the database. The Link Child Fields and Link Master Fields properties are implemented to designate the fields that are used to link the current table with the table specified in the Subdatasheet Name property. These properties should be left blank when you select [Auto] for the Subdatasheet Name. You use the Subdatasheet Height property to specify the maximum height of the subdatasheet and the Subdatasheet Expanded property to designate whether Access automatically displays the subdatasheet in an expanded state.

The Orientation property determines the layout direction for a table when it is displayed. The default setting for USA English is Left-to-Right. The Orientation property is language specific, and the Right-to-Left setting is available only if you are using a language version of Microsoft Access that supports right-to-left language displays. Arabic and Hebrew are examples of right-to-left languages. You must run a 32-bit Microsoft operating system that offers right-to-left support, such as the Arabic version of Windows 2000, to take advantage of this feature in Access. By installing the Microsoft Office Multilanguage Pack and the Microsoft Office Proofing Tools for a specific language, and by enabling the specific right-to-left language under the Microsoft Office language settings, you can also turn on right-to-left support.

    Part III: Creating Your Own Database and Objects
    Part V: Advanced Topics