Database Field Properties
Database Field Properties
Unfortunately, entering the data in an Access database table is one of the most
tedious activities known to humankind. And because the activity is so dull,
people are prone to make mistakes when they enter data in an Access 2019
database table. One way to cut down on mistakes is to take advantage of the
Field Properties settings on the General tab in the Design view window.
Description
Field Properties
FIELD SIZE
• The Field Size box for Text fields, enter the maximum number of characters
that can be entered in the field.
INPUT MASK
• For Text and Date field types, this feature provides a template with
punctuation marks to make entering the data easier. Telephone numbers,
social security numbers, and other numbers that typically are entered along
with dashes and parentheses are ideal candidates for an input mask (another
ridiculous database term!). On the datasheet, blank spaces appear where the
numbers go, and the punctuation marks stand at the ready to receive numbers.
STEP 4:
Choose your
desired option
Input Mask
STEP 5:
Click Next
STEP 1:
Add field name
and data type
STEP 3:
Select … for
options
STEP 2:
Input Mask
STEP 6:
Click Next
STEP 7:
Click Next
STEP 8:
Click Finish
INPUT MASK
DATASHEET VIEW – Before the
DESIGN VIEW data is entered
Enter
Information here
CAPTION
• If the field you’re working on has a cryptic or hard-to-understand name, enter
a more descriptive name in the Caption text box. The value in the Caption
property appears as the column heading in Datasheet view.
DEFAULT VALUE
• When you know that the majority of records require a certain value, number,
or abbreviation, enter it in the Default Value text box. That way, you save
yourself the trouble of entering the value, number, or abbreviation most of the
time because the default value appears already in each record when you enter
it. You can always override the default value by entering something different.
DEFAULT VALUE
In Design View
Add Default Value
Datasheet View
VALIDATION RULE
• As long as you know your way around operators and Boolean expressions,
you can establish a rule for entering data in a field. For example, you can
enter an expression that requires dates to be entered in a certain time frame.
Or you can require currency figures to be above or below a certain value. To
establish a validation rule, enter an expression in the Validation Rule text box.
To use dates in an expression, the dates must be enclosed by number signs
(#). Here are some examples of validation rules:
VALIDATION RULE
Setting upper
or lower limit
VALIDATION TEXT
If someone enters data that violates a validation rule that you enter in the
Validation Rule text box, Access displays a standard error message. The
message reads, “One or more values are prohibited by the validation rule set for
[this field]. Enter a value that the expression for this field can accept.”
If this message is too cold and impersonal for you, you can create a message of
your own for the error message dialog box. Enter your friendly message in the
Validation Text box. Text to be
displayed…
VALIDATION TEXT
Validation Text
REQUIRED AND INDEXED
• By default, no entry has to be made in a field, but if you choose Yes instead of
No in the Required box and you fail to make an entry in the field, a message
box tells you to be sure to make an entry.
• This property indicates whether the field has been indexed. Indexes make
sorting a field and searching through a field go faster. The word No appears in
this text box if the field has not been indexed.
TEXT ALIGN
• Text alighment of the text in control.
Activity