Tải bản đầy đủ (.pdf) (22 trang)

Access 2003 In Pictures phần 2 ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (595.27 KB, 22 trang )


DATABASE BASICS
20
9. 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
Baker, ID #298 who needs his gall bladder removed.



DATABASE BASICS
21
Create 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:

Baltimore

then press TAB.



DATABASE BASICS
22
6. 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.



DATABASE BASICS
23
Add 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:



3. Double-click the column heading and type:

State

4. Press the ENTER key.


DATABASE BASICS
24
5. 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.


DATABASE BASICS
25
Move 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:




DATABASE BASICS
26
4. On the Menu Bar, click File, then Close.



5. When prompted to save the changes to the table layout, click the
button.












DATABASE BASICS
27
The Friends database window should now look like this:




DATABASE BASICS
28
Create forms

1. In the Objects list, click Forms.



2. Double-click Create form by using wizard.




DATABASE BASICS
29
3. When the Form Wizard window appears, click the button.





DATABASE BASICS
30
All the table fields should be added to the form:




4. Click the button.


DATABASE BASICS
31
5. When the next screen appears, leave Columnar selected, then
click the button.









DATABASE BASICS
32
6. When the next screen appears, make sure Standard is selected,
then click the button.





DATABASE BASICS
33
7. When the last screen appears, type:

Friends of Mine Data Input Form


in the box.










DATABASE BASICS
34
8. Click the button.

The form should open and look like this:





DATABASE BASICS
35
Add a new record

1. In the form window, click the button.




A blank record should appear:



DATABASE BASICS
36
2. 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:


VA

then press the TAB key.


DATABASE BASICS
37
7. Type:

23220

then press the TAB key.

8. Type:

8005557890

The form should now look like this:




DATABASE BASICS
38
9. Press the TAB key again.

The form should progress to a new, blank record:




The old record has been saved.


DATABASE BASICS
39
10. On the Menu Bar, click File, then Close to return to the database
window.




DATABASE BASICS
40
Create 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?”


DATABASE BASICS
41
2. Double-click Create query by using wizard.



3. When the Simple Query Wizard opens, double-click First
Name in the Available Fields list.



×