When the alert window that reads There is no primary key defined appears, click the button.. The key field When the alert window popped up, and you clicked the Yes button, Access added
Trang 19 When the alert window that reads There is no primary key
defined appears, click the button
Access will insert an ID field—the Key field—in the table:
10
The key field
When the alert window popped up, and you clicked the Yes button,
Access added the ID field to the table
The ID field is now the table’s primary key, or key field That means it
can’t contain any duplicates
Every table should have a key field
For example, if a hospital keeps a database, each patient can have a unique ID number in the key field
That way, if it has more than one patient named John Baker, it can easily distinguish John Baker, ID #326 in for a checkup, from John
Trang 2Create records
1 Click in the box under the First Name column header
2 Type:
Elvis
3 Press the TAB key on your keyboard
The table should now look like this:
4 Type:
Presley then press the TAB key
5 Type:
Trang 36 Type:
21212 then press TAB
7 Type:
4105551212 then press TAB
The table should now look like this:
Tip: Notice how the cursor in the row selector has moved down
to the second (new) record When you move on to a new record, Access automatically saves the previous record
Trang 4Add new fields
1 Right-click the Zip column heading
2 When the menu appears, click Insert Column
The table should now look like this, with a new blank field:
Trang 55 Click inside the new State field for the first record
6 Type:
MD
7 Press TAB until the cursor moves down to a new record
Record number 1 is saved and complete
Trang 6Move fields
1 Click the Phone Number column heading
The entire column should be selected
2 Place the cursor on the Phone Number column heading
Then drag the column so the cursor rests between the Last Name and City columns
3 When you see a thick black line between the two columns,
release the mouse button
The Phone Number column should now rest between the Last Name and City columns:
Trang 74 On the Menu Bar, click File, then Close
5 When prompted to save the changes to the table layout, click the
button
Trang 8The Friends database window should now look like this:
Trang 9Create forms
1 In the Objects list, click Forms
2 Double-click Create form by using wizard
Trang 103 When the Form Wizard window appears, click the button
Trang 11All the table fields should be added to the form:
4 Click the button
Trang 125 When the next screen appears, leave Columnar selected, then
click the button
Trang 136 When the next screen appears, make sure Standard is selected,
then click the button
Trang 147 When the last screen appears, type:
Friends of Mine Data Input Form
in the box
Trang 158 Click the button
The form should open and look like this:
Trang 16Add a new record
1 In the form window, click the button
A blank record should appear:
Trang 172 Press TAB to advance to the First Name box
3 Type:
Bo then press the TAB key
4 Type:
Diddley then press the TAB key
5 Type:
Richmond then press the TAB key
6 Type:
Trang 187 Type:
23220 then press the TAB key
8 Type:
8005557890
The form should now look like this:
Trang 199 Press the TAB key again
The form should progress to a new, blank record:
The old record has been saved
Trang 2010 On the Menu Bar, click File, then Close to return to the database
window
Trang 21Create queries
1 In the Objects list, click Queries
What’s a query?
A query is a way to get specific information from the database
Essentially, it’s a question You use queries to ask the database things like, “Who are my customers in Montana?”, or “How many pipe fittings have I sold this month?”
Trang 222 Double-click Create query by using wizard
3 When the Simple Query Wizard opens, double-click First
Name in the Available Fields list