Professional Documents
Culture Documents
Access Practice PDF
Access Practice PDF
Access Practice PDF
This exercise is for you to practice using MS Access in the lab, and to provide you with help as to
how to work with access. In many regards, it is similar to yourfor-grade project. The goal with
this project is to learn how to create and use an MS Access database, not to rush through the
exercise. Take your time and follow the instructions carefully it will help you later while
working on the actual project.
Our database shall be to keep track of salespersons in a company. The SALESPERSON table
shall be made up of the following fields:
There should be a table of customers who are Customers of the salespersons, the CUSTOMER
table. It should be made up of the following fields:
1. First open up MS Access. Click in theCreate a New Database boxs use aBlank Database
radio button. Then click OK.
2. Youll be asked to save the new database. Place your diskette in the A drive. Click in the
Save in box, and click on3 inch floppy A. Down below, click in theFile namebox, and
call thisEmployee.mdb. Remember this database will have two tables. Click Create.
3. The blank database will be presented. TheTables tab will already be selected for you. Note
that you cant select anything but New on the right. Click on it.
4. A new dialog box is opened. Click on Design View, and then OK. You will do this for both
tables.
5. Now youll start setting up your table. In the Field Name column, give the field its identifying
name. You may use the suggested field names above. Then use the Tab key to tab over to
the Data Type. When you do, adrop-down arrow will be displayed, as well as the default of
Text.
6. Once you do this, theGeneral tab under Field Properties below will be selected. It is here
that you give the field its properties, such as field width, the > sign in Format for the Office
and State fields, which makes them uppercase, and you create the Validation Rule and
Validation Text, as described in the previous class session.
7. Go ahead and complete all the fields. When youre done with each table, before you leave
Design View, you will need to set up the Primary Key before you go to Datasheet View.
(actually, you need to do this before formatting the input mask for the SSN as a Social
Security Number)
To do this, place your cursor anywhere on the row containing the field to be designated
as the Primary Key.
Now click on the little key icon on the standard tool bar. The Primary Key will be
assigned.
8. Now click on the Datasheet view icon. Youll be prompted to save the table. Call it
Salesperson and click OK. After the save is complete, the Datasheet view will be displayed.
9. Now enter in all of your data for the Salesperson Table. Enter about 5 records.
1. Now that you have created the Salesperson Table, and entered the data, youre ready to
created the Customer Table.
2. Following Steps 1 through 9 in PART II, create the Customer Table and enter the data, using
the same steps for corresponding fields.
3. MAKE SURE THAT THE CUSTOMER RECORDS CONTAIN SALESPERSON ID#s
WHICH EXIST IN THE SALESPERSON TABLE.
4. Enter about four records.
Follow each step in the wizard process to complete your report. At the end of the process, youll
be prompted to give the report a name. Do that, and clickFinish. The report will be previewed
for you. After previewing it, you may exit the report. If you were to print it, you would click on
the Print icon.
When you create this kind of query, using the same steps (1 through 3 above) you did before, this
time add both tables from the Show Table box. The relationship you have previously created
will also be in the query. Now you can follow the same steps above, selecting fields from both
tables, without even displaying (or using) the Salesperson ID in the query as a field. The
connection between the common Salesperson IDs will allow data such as the employee's name
and his customers city to be displayed.