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

Tài liệu THE VISIBOOKS GUIDE TO ACCESS 2003 pptx

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 (15.95 MB, 242 trang )


TABLE OF CONTENTS
i
Table of Contents
Database Basics 1
Create a new database 2
Create tables 13
Create records 21
Create forms 28
Create queries 40
Create reports 47
Working with Tables 63
Modify tables 64
Create new tables 82
Specify data types 86
Specify field properties 101
Edit records 104
Find records 108
Sort and filter records 113
Create table relationships 119

TABLE OF CONTENTS
ii
Working with Forms 131
Modify forms 132
Add/delete records 146
Edit records 150
Find records 153
Filter records 156
Working with Queries 161


Create queries 162
Sort results 169
Add criteria 172
Employ Boolean operators 175
Find duplicate records 181
Create Update queries 189
Create Delete queries 197
Working with Reports 207
Format reports 208
Create mailing labels 225


DATABASE BASICS
1
Database Basics


In this section, you’ll learn how to:

• Create a new database
• Create tables
• Create records
• Create forms
• Create queries
• Create reports






DATABASE BASICS
2
Create a new database

1. Start Microsoft Access 2003.

Your screen should look like this:




DATABASE BASICS
3
2. In the Getting Started pane, click Create a new file.




DATABASE BASICS
4
3. When the New File pane appears, click Blank Database.



DATABASE BASICS
5
4. When the File New Database window appears, create a new
folder in the My Documents folder called Practice Access
Files.



Tip:
To create a new folder, double-click the
My Documents

folder so it appears in the
Save in
drop-down list.

Then click the
icon.







DATABASE BASICS
6
5. Double-click the Practice Access Files folder.

It should appear in the Save in box.











DATABASE BASICS
7
6. In the File name box, type:

Friends.mdb



Tip:
The file extension for Access databases is
.mdb
.

Just like Word files are
something.doc
, and Web pages are
somethingelse.html
, Access databases are
database.mdb
.

MDB
stands for “Microsoft DataBase.”









DATABASE BASICS
8
7. Click the button.

The window for the Friends database should open:





DATABASE BASICS
9
Identify database elements































Elements of databases

A database stores information in an organized way, and makes it easy
to get information in and out.

Tables
store data within the database.

Forms
make it easy to put data into tables.

Queries
pull out specific data.


Reports
put data in an easily-read format.




Table
Query
Report
Form
Table

DATABASE BASICS
10
1. In the Objects list, click Tables.



2. Click Queries.




DATABASE BASICS
11
3. Click Forms.




4. Click Reports.




DATABASE BASICS
12
5. Click Tables.

6. Click the button.



The Friends database window should expand to fill the screen:




DATABASE BASICS
13
Create tables

1. Double-click Create table by entering data.



A blank table should open:





DATABASE BASICS
14
Name fields

1. Double-click the Field 1 column header.



2. Type:

First Name

3. Press the ENTER key on your keyboard.

The column header should look like this:




DATABASE BASICS
15
4. Double-click the Field2 column header.



5. Type:

Last Name


It should look like this:



6. Press the ENTER key on your keyboard.

7. Double-click the Field3 column header, type:

City

then press ENTER.


DATABASE BASICS
16
8. Double-click the Field4 column header, type:

Zip

then press ENTER.

9. Double-click the Field5 column header, type:

Phone Number

then press ENTER.

The table should now look like this:




DATABASE BASICS
17
Delete unused fields

1. Right-click the Field6 column header.



2. When the menu appears, click Delete Column.




DATABASE BASICS
18
3. When the alert window appears, click the button.



4. Right-click the Field7 column header.

When the menu appears, click Delete Column.

When the alert window appears, click the button.

5. Delete the Field8, Field9, and Field10 columns the same way.

The table should now look like this:





DATABASE BASICS
19
6. On the Menu Bar, click File, then Save.



7. When the Save As window appears, type:

Friends of Mine

in the Table Name box.



8. Click the button.


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.


×