LearnShop Tutorial on Microsoft Access 2007 Basics

Learning Objectives

Upon completion of this learning session you should be able to:

·         Start a new database

·         Design, modify, name, and save a table

·         Navigate a database and enter records

·         Create a Select Query

·         Create a Relationship between tables at the query level

To Start Microsoft Access click on:

 Start>Programs>Microsoft Office>Microsoft Access 2007>

Click on Blank Database

You are prompted to save your database. Please choose the name and storage space you want to use to save. In this case we have chosen our name on drive Z on EMCC’s network.

 

Click to browse for a location to save the file.

 

 

In the File Name: field delete the default name Database1 and type Student Information then click OK.

 

Enter File Name

 

 

Then click Create to create the database.

 

Click Create

 

Access creates the table with default name Table1 and primary key field ID.

 

Primary Key:

Right Click

To Rename

 

Table Name

 

 

 

 

The following picture shows parts of the Access 2007 window.

 

 

Access Buttons1.jpg

Right-click the ID column heading to display the shortcut menu, and then click Rename Column.  Type Student ID for the column name. From the Data Type: drop-down box select Text.  Check the Unique box. 

 

Select Data Type and check Unique

 

Enter Field Name

 

 

 

 

 

 

To enter the rest of the field names double-click the column heading Add New Field for each additional field.  Enter First Name, Last Name, and State.

 

Double click then

enter field name.

 

 

 

 

 

 

 

 

 

 

 

 

To enter the records click in the first row for the Student ID field, enter 1, hit the Tab Key, enter Jane for the first name, hit the Tab Key, enter Martinez for the last name, hit the Tab Key, and enter AZ for the state.  Repeat this process for records 2 through 5.

Enter records

 

 

Microsoft Access automatically saves each record as you complete the last field. When finished entering all records, save and name the table.  Click the Save button on the Quick Access Toolbar.   The Save As dialog box opens.  Type Student Data in the Table Name field and click OK.

Click

To

Save

 

Enter table name

 

 

The tab for the table now displays the name Student Data.  Click the Close ‘Student Data’ button on the table window bar to close the table.  The database stays open.

New table

name

 

Click to close table

 

Now start a new table by clicking the Table button on the Create tab. This new table will hold the courses that the students are taking during a semester.

Click to create new table

 

 

 

Enter field names as in the picture below.  Assign the Student ID field as the Primary Key field and check the Unique box.  Enter the data in the table as shown below:

 

 

When finished, right click the Table1 tab and enter Student Schedule for the table name.

 

 

Click OK and close the Student Schedule table.

Creating a Query

 

From the Create tab, select the Query Design button.

Select each table and

click Add.

 

Click to create a Query

 

Click to create a Query

 

 

 

Select each table and click Add.  Click Close.  Drag Student Id from the Student Data table to Student Id in the Student Schedule table to establish a relationship.

 

Drag key from first table to key in second table.

 

 

 

 

 

Double click the field names that we want to select for the query.  The fields will be added to the design grid at the bottom of the screen.

 

Double click field to add it to the Query

 

 

 

Then click the Run button on the Design tab.

 

 

 

Click to run the Query

 

 

 

 

 

 

 

 

The results of the Query are displayed.

 

Right click on the Query1 tab and click Save.

 

Right click tab and select Save.

 

 

Change the name in the save box to Student Class Query and click OK.

 

To run the query for a specific student, click View from the Design tab and click Design View. Enter student id ‘3’ in the Criteria field of Student ID. 

Enter criteria for query

 

Click to change the view

 

 

 

Click Run from the Design tab and the information for only student ‘3’ is displayed. 

 

Close the query and reply No when asked to save changes to the Query.  You will see all of the Database objects listed on the left side of the screen. 

 

 

Close the Student Information Database and exit Microsoft Access 2007. Access saves automatically. This concludes our Microsoft Access 2007 Basics tutorial.