Microsoft Office Tutorials and References
In Depth Information
Session 2.1
Figure 2-13
Selecting a value for the Data Type property
“d” typed
“ate/Time”
automatically
added and
highlighted
11. Press the Tab key to advance to the Description text box, and then type Month/day/year .
Note that Access changes the value for the Data Type property to Date/Time.
12. In the Format text box, type mm/dd/yyyy to specify the custom date format for the
EndDate field.
13. Set the Caption property for the field to End Date .
You’ve finished defining the fields for the Position table. Next, you need to specify the
primary key for the table.
Specifying the Primary Key
Although Access does not require a table to have a primary key, including a primary key
offers several advantages:
• A primary key uniquely identifies each record in a table.
• Access does not allow duplicate values in the primary key field. If a record already exists
with a PositionID value of 1320, for example, Access prevents you from adding another
record with this same value in the PositionID field. Preventing duplicate values ensures
the uniqueness of the primary key field.
• When a primary key has been specified, Access forces you to enter a value for the pri-
mary key field in every record in the table. This is known as entity integrity . If you do not
enter a value for a field, you have actually given the field what is known as a null value .
You cannot give a null value to the primary key field because entity integrity prevents
Access from accepting and processing that record.
• Access stores records on disk in the same order as you enter them but displays them in
order by the field values of the primary key. If you enter records in no specific order, you
are ensured that you will later be able to work with them in a more meaningful, primary
key sequence.
• Access responds faster to your requests for specific records based on the primary key.
 
Search JabSto ::




Custom Search