Field properties control how data is stored, displayed, and validated in a table. In this lesson, you will learn about important field properties and how to use them in Microsoft Access.
Field properties are settings that define the behavior and characteristics of a field in a database table.
Examples:
For example, you can make a StudentName field required so that users cannot leave it empty when creating a record.
Available properties depend on the selected field's data type and your Access version.
Field Size controls the permitted size or range of values for supported data types.
Example:
For a Short Text field, you can set a maximum length appropriate for the information being stored.
For Number fields, the Field Size setting determines the numeric storage type and range.
The Format property controls how a value is displayed. It generally changes the appearance of a value rather than changing the underlying stored value.
Example:
| Stored Value | Possible Display Format |
|---|---|
| 1250 | 1,250 |
| 5000 | ₹5,000.00 (with suitable currency formatting) |
| 11/10/2026 | 11-Oct-2026 (with suitable date formatting) |
Default Value automatically supplies an initial value when a new record is created. The user can usually change it unless another rule prevents the change.
If most students live in India, you can set the Default Value of a Country field to:
"India"
The expression must be appropriate for the field's data type. A default value does not automatically update every existing record.
The Required property determines whether a field must contain a value in a record.
Set Required to Yes for StudentName if every student record must have a name.
Important: Required does not mean that the field must contain a unique value. Use a primary key or an appropriate unique index when uniqueness is required.
A Validation Rule restricts the values users can enter into a field or record.
>=0 And <=100
This rule allows values from 0 through 100.
>=18
>=0
Validation rules should match the business requirements of your database.
Validation Text displays a message when a value fails the Validation Rule.
Example:
Validation Rule:
>=0 And <=100
Validation Text:
Enter marks between 0 and 100.
If a user enters 120, Access can display the validation message to explain the problem.
Caption provides a more user-friendly label for a field in supported displays, forms, and reports.
Example:
| Field Name | Caption |
|---|---|
| StudentName | Student Name |
| AdmissionDate | Date of Admission |
| FeesPaid | Fees Paid (₹) |
A caption improves readability without requiring you to rename the underlying field.
The Indexed property creates or controls an index on a field. Indexes can improve the speed of searches, sorting, and joins.
Common options include:
Examples:
A primary key automatically has a unique index. Indexes can improve performance, but creating too many can slow down data updates.
| Property | Main Purpose |
|---|---|
| Field Size | Controls text length or numeric storage range where supported. |
| Format | Controls how a value is displayed. |
| Default Value | Supplies an initial value for new records. |
| Required | Requires a value in the field. |
| Validation Rule | Restricts permitted values. |
| Validation Text | Displays an explanatory validation message. |
| Caption | Provides a user-friendly display label. |
| Indexed | Controls indexing and duplicate-value behavior. |
Create a Students table with these fields:
| Field Name | Data Type | Property to Set |
|---|---|---|
| StudentID | AutoNumber | Primary Key |
| StudentName | Short Text | Required: Yes |
| Country | Short Text | Default Value: "India" |
| Marks | Number | Validation Rule: >=0 And <=100 |
| CourseFee | Currency | Validation Rule: >=0 |
Tasks:
1. Which property supplies an initial value for a new record?
2. Which property restricts marks to values between 0 and 100?
3. Which property provides a user-friendly label for a field?