Vous êtes sur la page 1sur 5

CA 101, Introduction to Microcomputers

LAB Modules
Introduction to MS Access
Microsoft Access gives you and your students the opportunity to learn and strengthen
skills as you gather data, create worksheets, analyze and chart the results, and
integrate your fndings into reports and assignments.
Database management system (DBMS)
A database management system is a program that sets up (structures) a database and provides tools for data
entry and retrieval.
!ere are se"en main components o# a database in MS Access$
1. ables% Use tables to store database information. Table is the heart of the Database, since it
contains the actual data and all other objects are base on the Table. e use Tables to store all
the data in the database. !ach ro" of the table contains one #ecord. #ecords are made up of
$ields that contain a particular piece of data in the table
%. &orms% Use forms to enter or edit the information in your tables. $orms let you vie" one
record at a time. !asier to access and use "hen entering or modifying Data than a Table
&. 'eports. Use reports to deliver a professional presentation or "ritten report to your class.
'. (ueries. $ilter data so that you retrieve selected records or fields from the database.
(. )ages% )reate *T+, pages from a database -uic.ly and efficiently.
/. Macros. Automate tas.s that you perform on a regular basis in a database.
0. Modules. Automate a group of related procedures in Access %111.
Changes how
Access 2000
displays icons.
eletes
selected
o!"ects.
#tandard
tool!ar
$rovides
options for
opening o!"ects
in your
data!ase.
Click one of
these four
!uttons to
create or open
a data!ase
o!"ect.
Click $ages to
create a ata
Access $age.
The first object to add to your database is a table% 2ou use tables to store all the data in
the database. !ach ro" of a table contains one record. #ecords are made up of fields that
contain a particular piece of data in the table.
!very table in +3. Access must have a field that uni-uely identifies each record in the
table% This field is called the primary key. 2ou can recogni4e the primary .ey in a table
by the 5D appended to it. The primary .ey ensures that you can retrieve data accurately
and efficiently "hen you pull information from the database. +3. Access automatically
assigns a primary .ey to each of your records for you "hen you use an Access Table
i4ard.
*ie+ing tables
There are t+o +ays to vie" your table6 Datas!eet "ie+ and Design "ie+.
hen you double7clic. a table object from the Access database "indo", it opens in
Datasheet vie".
Use Datasheet vie" "hen you "ant to vie", add, or delete data from a table. 2ou can also
reformat your table to change the si4e and order of the field columns in this vie".
1, Datas!eet "ie+
%se #ort Ascending
and #ort escending
to sort records !y a
selected feld.
&orm 'iew
(ool!ar
Click 'iew to
switch to
esign view.
Click a !o) to
select a
record.
Click &ind to
search for a
record.
Click *ew +ecord
and elete +ecord
to add or delete
records.
%se these !uttons
to move to
di,erent records in
a ta!le.
%7 Design "ie+
Use Design vie" "hen you "ant to change the structure of a table. 2ou can add or delete fields,
change a field caption or si4e, or select the type of data you plan to enter into a field in Design
vie".
Click the
ata!ase
-indow !utton
to open the
main data!ase
window.
Click one of
these
!uttons to
insert or
delete rows.
Click 'iew to
switch to
atasheet
view.
.dentifes the
properties of
the currently
selected feld.
%se this area to add
notes to yourself
a!out each feld.
+ead this
note for
information
a!out the
currently
selected
feld.
%se this
!utton to set
or change
your primary
key.
/a! Module 0 1 Microsoft
Access
-b.ecti"e$
To open an existing Access Database; to add, edit and delete records with a
Table in that Database.
Step / 1 Start M%S% Access
)lic. the start button to display the start menu
)lic. the )rogram menu and then clic. Microso#t Access
8pen en e9isting program Boo0store database, clic. open command button to open the
database
Step / 1 -pen t!e Boo0s table
2ou should see the database "indo" for the boo.store database "ith table button already selected.
Double clic. the boo.s to open the table
:ractice "ith the navigation buttons above the status bar to move from one record to ne9t. )lic.
or to move for"ard to ne9t record or return to the previous record.
)lic. ; to move to the first record in the table or ; to the last record in a table.
)lic. in any field of the first record. The status indicator at the bottom of the <oo. table indicates
the record 1 of %%. The triangle symbol in the record selector indicate the at the record has not
changed since it "as last saved
Step / 2 Add a ne+ record
:ull do"n the Insert menu and clic. the 3e+ 'ecord ( or ne+ record button). The record
selector moves to the last record (record %&). The insertion point is positioned in the first field
(53<= =umber)
!nter data for the ne" record (as sho"n in $ig).The record selector "ill changed .
:ress enter "hen you have entered the last field of record.
Add another record !nter 171&71&'%/17% as 53<= =umber. The title is !9ploring 8ffice >:. The
price is ?('.11. The boo. "as published by :rentice *all in %11&. Be sure to press enter when
you have completed the data entry
The status bar should sho" %' records
Step / 4 5dit a record
:ress Ctrl 6 7ome to move to the first record. )lic. in the itle #ield, pull do"n the 5dit menu
and clic. &ind (clic. the &ind button on the tool bar)
!nter any 53<= =umber in the $ind hat te9t bo9.
)lic. the $ind =e9t command button. Access moves to record =o if there is@
)lic. cancel to close the $ind dialog bo9
:ress Tab .ey Title field to the :rice field. The current price (?(%.A() is already selected .Type ?
(B.A( , then press enter 0ey
Step / 8 Deleting a record
Use the find command to search for the boo. A guide to S(L (adjust the $ind and replace dialog
bo9 as sho"n in fig
=o" :ull do"n the 5dit Menu and clic. the Selected 'ecord command to highlight the entire
record
:ress the Del 9ey ( or clic. the Delete 9ey button) to delete the record. 2ou "ill see the dialog
bo9 , indicating that you are about to delete the record and as.ing you to confirm the deletion.
)lic. :es%
:ull do"n the !dit +enu. The Undo command is dim, indication that you cannot undelete a
record. :ress 5SC to continue "or.ing.
Step / ; -pen a boo0 &orm
)lic. the &orm button in the database "indo". Double clic. the Boo0s &orm to open the form .
)lic. add 'ecord command button or use Alt 6 A
)lic. the te9t bo9 for ISB3 number , then use the ab 9ey to move from field to field C
!nter the te9t in )rice #ield to vie" the data validation that is build into Access. )lic. -9 "hen
you see error message, then enter the indicated price )lic. the Drop7Do"n arro" on the
publishers list bo9 to display the available publishers and to select the appropriate one.
)lose the <oo.s form to return the Database "indo".
Step / < 'un a (uery
)lic. the (uery button in the database "indo". Double clic. the )ublis!er (uery to run the
-uery. 2ou "ill see a bo9 as.ing to enter the name of a publisher
Type the Mc=ra+ 7ill and press enter to see the results of a -uery, "hich should contain three
boo.s by this publisher.
2ou can use -uery to display information, as "as just done , and Dor you can modify data in the
underlying table. )lic. the )ublis!er #ield fro the blan. record in the last ro". Type the Mc=ra+
7ill to begin entering data for a ne" rerecord.
)lic. the close button to close the -uery and return to Database "indo".
Step / > -pen a 'eport printer should be installed for this part
)lic. the #eport button in the Database "indo" to display the available reports
Double clic. the icon for the )ublis!er report%Type Mc=ra+ 7ill in the parameter dialog bo9. :ress
enter.
)lic. the +a9imum button in the report "indo" so that the report ta.es the entire screen
)lic. the ?oom button to toggle to 111 E so that you can read the report, "hich should contain four
records.
T"o boo.s "ere in the database initially, one boo. "as enter through a form, and one boo. "as entered
through -uery. All of the boo.s in the report are published by Mc=ra+ 7ill
)lic. the )rint button if printer is available
)lic. the Close button to close the 'eport @indo+.
Printer should be installed for this par. ou may leave this part here