1. Creating a New Table Using Application Parts
Access
2010 enables you to create databases and fields using templates. One
new capability in Access 2010, Application Parts, enables you to create a
table and several related forms, queries, and reports that display and
summarize the data from that table. For example, if you want to maintain
a list of contacts, you can use the Access 2010 Contacts Application
Part to create a Contacts table, three forms, a query, and four reports
to view your contacts, display a phone list, and create address labels
based on that information.
1.1. Create a Table, Forms, and Reports Using Application Parts
Click the Application Part you want to use.
Select the There Is No Relationship option.
Click Create.
Note:
If the
Application Part you used relates to an existing table in your
database, such as if your Contacts table tracks your contacts with the
individuals named in your Customers table, you can use the Create
Relationship Wizard to define that relationship.
2. Setting a Primary Key
One
aspect of sound table design is to have a field (or group of fields)
with a value unique to each row in the table. The fields that have the
unique value are called the primary key
field(s). Because each row’s primary key field (or fields) contains a
unique value, Access 2010 can distinguish each row from all the other
rows in the table. Why is that important? Consider what would happen if a
store used your phone number to identify you when you called in to
place an order. If you change phone numbers and the next person assigned
your phone number calls in before you do, the store replaces your
information with the new caller’s, potentially wiping out any record you
had of doing business with the store.
2.1. Assign a Primary Key
Display the tables in your database.
Right-click the desired table.
Click any cell in the row representing the field to be the primary key.
Make sure the Design tab is displayed, and click the Primary Key button.
Click the Save button to save your work.
Click the Close box.
Note:
The primary key shouldn’t contain
meaningful information. The best value for a primary key field is a
number that Access 2010 increments for each row in a table. That type of
field is called an AutoNumber field.
Note:
You can
create a multiple-field primary key by Ctrl-clicking the row selectors
of the fields you want to include in the primary key.