Microsoft Office Tutorials and References
In Depth Information
Entering and Altering Table Fields
Deciding how the data in fields is displayed
To decide how numbers, times, dates, currency
values, and Yes/No data are displayed in fields,
go to the General tab in the Field Properties part
of the Design view and choose an option on the
Format drop-down list. The display options are
useful indeed. Choose the Currency format,
for example, and you don’t have to enter the
dollar signs or commas when you enter a dollar
figure in the field because the dollar sign and
commas are entered for you.
Moreover, you can create a format of your own
by entering these placeholder symbols in the
Format text box:
@ (at symbol): A character or space is
required. For example, @@@@-@@ inserts
a hyphen between the first set of numbers
and the second. You don’t have to enter the
hyphen, only the text or numbers.
& (ampersand): A character or space is
optional. For example, @@@@@-&&&&
in a ZIP Code field tells Access that either
entry is correct, a five-character ZIP code
or a five-character plus the four extra
characters ZIP code.
> (right bracket): Displays all characters in
the field as uppercase. Merely by entering
this symbol in the Format text box, you can
display all entries in the field as uppercase
without the data-entry clerk having to hold
down the Shift or Caps Lock key.
< (left bracket): Displays all characters in
the field as lowercase.
Designating the primary key field
As I explain in Chapter 1 of this mini-book, no database table is complete
without a primary key field. The primary key field identifies which field in
the table is unique and contains data that differs from record to record.
Duplicate values and null values can’t be entered in the primary key field.
(A null value indicates a missing or unknown value.) Choosing a primary
key field is so important that Access doesn’t let you close a table unless you
choose one.
If no field in your table holds one-of-a-kind data that is different from record
to record, get around the problem with one of these techniques:
The AutoNumber data type: Create a new field, give it a name, choose
AutoNumber from the Data Type drop-down list (refer to Figure 2-3),
and make your new field the primary key field. This way, when you
Search JabSto ::




Custom Search