HNDA 2105
Database Management
Systems and Data
Analysis
MS Access Field Properties
1
Identify the unique field
• Unique field is a field with values that occur only
once in a table.
– For an example National Identity card number
uniquely identifies a person.
• A field or a combination of fields that uniquely
identify each record in a table is called a Primary
Key.
• In some table it takes more than one field to
create a primary key and that is called as a
Composite Key.
Apply Primary key
How to
Control Data Entry Formats
to a table field
4
• Display control
• Combo box
• List box
Field Properties Pane
• Field size determines the amount of data that
can be stored in a field
• Formats allow you to display your data in a
form that differs from the actual keystrokes
used to enter the data.
• Default Value is one that is displayed
automatically for the field when you add a
new record to the table.
• Input Mask allows you to have more control
over data entry by defining data-validation for
each character that is entered in the field.
Input masks
• Input masks provide a set format for data entry
in a field by using characters and symbols.
• When you apply an input mask to a field,
anyone who inputs data in that field must follow
the specific pattern defined by the input mask.
10
Input masks
• Input masks provide a large amount of data
validation and prevent users from entering
invalid data (such as a phone number in a date
field).
• Input masks can also help ensure that users
enter data in a consistent way.
• That consistency can make data easier to find
and make it easier to maintain your database.
11
Characters that define input masks
12
How to
Add an
input
mask to a
table field
13
• Data Validation enables you to limit values
that can be accepted into a field.
I. Validation Rule to set the rule.
(ex: <=100)
II. Validation text to display error message.
(ex: “please enter a valid customer ID”)
email addresses - validation
15
Validation rule & Validation text
• The validation rule shown in the above table
ensures that the email address is entered with
one or more characters, then an “@” sign, then
one or more characters, then a period, and then
one or more characters.
• For example, tom@example.com would be
allowed,
but tom@example,com or tom@example would
not.
16
• Required enables you to enter a Yes value for
Required if a field should always receive a
value during data entry.
• Indexed
1. Unique Index(no duplicates).
2. Duplicate Index(with duplicates).
• Caption is used when you want to display an
alternate name for the field on forms an
reports.
Questions?
19