Microsoft Office Tutorials and References
In Depth Information
Setting the Caption Property for Fields
Decision Making: Specifying the Field Size Property for Number Fields
When you use the Number data type to define a field, you need to decide what the most
appropriate Field Size setting should be for the field. You should set the Field Size property
based on the largest value that you expect to store in that field. Access processes smaller
data sizes faster, using less memory, so you can optimize your database’s performance and
its storage space by selecting the correct field size for each field. Field Size property
settings for Number fields are as follows:
Byte: Stores whole numbers (numbers with no fractions) from 0 to 255 in one byte
Integer: Stores whole numbers from –32,768 to 32,767 in two bytes
Long Integer (default) Stores whole numbers from –2,147,483,648 to 2,147,483,647 in :
four bytes
Single: Stores positive and negative numbers to precisely seven decimal places and uses
four bytes
Double: Stores positive and negative numbers to precisely 15 decimal places and uses
eight bytes
Replication ID: Establishes a unique identifier for replication of tables, records, and
other objects in databases created using Access 2003 and earlier versions and uses
16 bytes
Decimal: Stores positive and negative numbers to precisely 28 decimal places and uses
12 bytes
Choosing an appropriate field size is important to optimize efficiency. For example, it
would be wasteful to use the Long Integer field size for a Number field that will store only
whole numbers ranging from 0 to 255 because the Long Integer field size uses four bytes of
storage space. A better choice would be the Byte field size, which uses one byte of
storage space to store the same values. By first gathering and analyzing information about the
number values that will be stored in a Number field, you can make the best decision for the
field’s Field Size property and ensure the most efficient user experience for the database.
Setting the Caption Property for Fields
The Caption property for a fi eld specifi es how the fi eld name is displayed in database
objects, including table and query datasheets, forms, and reports. If you don’t set the
Caption property, Access displays the fi eld name as the column heading or label for a
fi eld. For example, fi eld names such as ContractAmt and SigningDate in the Contract
table can be diffi cult to read. Setting the Caption property for these fi elds to “Contract
Amt” and “Signing Date” would make it easier for users to read the fi eld names and work
with the database.
Setting the Caption Property vs. Naming Fields
Although Access allows you to include spaces in field names, this practice is not
recommended because the spaces cause problems when you try to perform more complex
tasks with the data in your database. Setting the Caption property allows you to follow
best field naming practices, such as not including spaces in field names, while still
providing users with more readable field names in datasheets, forms, and reports.
In Tutorial 1, you created the Belmont database and the Contract table. Before you
create the new tables for the database, Oren suggests that you view the formatting of the
fi elds in the Contract table to determine if any changes are needed to improve how the
data is displayed.
Search JabSto ::

Custom Search