|
Table Properties in |
|
Most Access users are aware that when setting up a table in
a database, the database can be made more robust and user friendly by
setting field properties such as Required, Default Value, Validation rule
etc. As well as each field having properties, a table itself can have properties that affect how data is entered and displayed. You can access the property sheet by selecting Properties from the View menu in table design view or by right-clicking in the table design area and choosing Properties from the shortcut menu or by pressing Alt+Enter.
Note: Not all of the following properties are available in all versions of Microsoft Access. DescriptionYou see the table's description when you select the View4 Details menu item in the database window. Use this field to describe what you're using the table for. In a linked table, this property will show information relating to the link (eg the path or type of the linked data). Default ViewThe default view of data can be either Datasheet, PivotTable or PivotChart. Validation RuleAccess tests the table's validation rule when you leave the current record. This rule is useful when you're creating rules based on multiple fields (eg [Start Date] <= [End Date]). You can also test individual fields, but you must include the field name (eg [Salary] < 100000). Validation TextThis is the text you wish to display when a user violates the table's Validation Rule. If this is left empty, Access displays a default message that may be less than helpful to users of the database. FilterEnter a valid SQL Where clause into this property to display a subset of data when you view the table. Using the Filter by Selection and Filter by Form options in datasheet view also sets this property. This is why you are prompted to save changes to the design of a table when you open a table, create a filter, then attempt close the table. In the example below, all females with a Surname of "Smith" are selected.
Order BySet this to a field in the table to sort the data by that field. Clicking on the Sort Ascending and Sort Descending buttons in datasheet view also sets this property. Changing the sort also causes the Save Changes prompt to appear. In the example above, the records in the Employee table are sorted by the Surname field. SubdatasheetNameA subdatasheet is basically a table nested inside another table that contains data related to the main table. Clicking on the plus sign to the left of a record expands the subdatasheet in the table's datasheet view. Click on the minus sign to collapse the subdatasheet. Set this property to select from which table or query the subdatasheet pulls data. Setting this field to "[Auto]" uses the table's relationships to determine which table to display. The screen below shows the Branch table with the Employee table in the subdatasheet, with the subdatasheet for Eastwood expanded.
Setting this property to "[None]" will suppress the subdatasheet for the associated table, even when relationships are established between the tables; this will speed up database performance. Link Child FieldsSet this property to the fields in the child table, which displays in the subdatasheet, that relate it to the fields in the master table. Use this to create a subdatasheet when there is no relationship between the tables. Link Master FieldsSet this property to the fields in the master table, the table currently in design view, that link to the fields in the child table. Use this to create a subdatasheet when there is no relationship between the tables. Subdatasheet HeightSet this to 0 if you want the subdatasheet to expand to its maximum size. Setting it to another number limits the height of the subdatasheet. Subdatasheet ExpandedSet this to Yes if you want all the subdatasheets expanded when you open the table in datasheet view. Leave it set to the default value of No if you want them collapsed. OrientationDetermines whether the fields appear in Datasheet view from the left of the screen to the right or vice-versa. Note: Changing some of the properties above may cause the subdatasheets to "disappear". Closing the table, and then re-opening it will restore them. |