Microsoft Access – Exercise
Follow the directions below to create an Address Database. Remember that there is usually more than one way to do something. If you think of a different way to do a task, try it! If it doesn’t work, you can always use the Undo button. Please read through each direction before performing the action.
- Launch the Access program by double clicking on the Access icon on the desktop
- In the pane on the right side, click Blank database.
- Click File à Save As à Addresses (Microsoft access will append the file type of “accdb” to your file name.
- The first thing you see will be the Data Worksheet – looks like Excel.
Creating a Table
- You already have a Table specified on the left hand side of the screen, called “Table1”
- Click on the “Click to Add” button at the top of the second column, and select “Short Text” – this is the datatype of the field.
- “Field 1” is highlighted, so type in First Name
- Click on the “Click to Add” button at the top of the third column, and select “Short Text”
- “Field 2” is highlighted, so type in Last Name
- Add the following fields, each as “Short Text” to your table.
- Your table should look like this when done:
- Click on the “x” on the right hand side of the Address tab. Access will ask if you want to save your changes. Click “Yes”, and rename the table to Addresses.
Entering Table Data
- Double click Addresses to open the table we have created. In the table fields, ignore the one labeled ID for now.
- Press the right arrow key or tab key and enter these field values, pressing enter after each value:
|Betty||Bop||123 Apple Way||Houston||TX||77333||(713)555-5555|
|Daffy||Duck||5492 Hill St||Houston||TX||77009||(713)555-9999|
|Mickey||Mouse||902 East Lucky Ave||Humble||TX||77398||(281)555-5555|
3. Click Save and close the table.
- Note how the ID field is populated as you type.
Creating a Form
- Click the Form tab in the database window.
- Click Save – Access will ask you to name the form – type Addresses
- In the upper left hand corner there is a “View” tab – click on it, and select “Form View”
Entering Data into a Form
In Access, you can enter data into Tables or Forms. Some find it easier to enter and view data in forms rather than tables. Let’s use the form we just created to enter more data.
- Click the Forms tab in the database window
- Double click “Addresses” to open the form; make sure you are in Form View.
|Sponge||Bob||758 Awesome Way||Houston||TX||77999||(713)555-0000|
- Click the Save
- Note that there are two “Addresses” tabs in the database you are working on (on the right in the picture below. Even when you click “Save”, that fourth record does not show in the “Addresses” table view. Hit F5, and it will appear.
- Betty Bop is spelled incorrectly. Select the left “Addresses” tab (the table view” above), and change “Bop” to “Boop”
- Click Save
Let’s find the people in our Address Book database that live in Houston. We are planning a last minute birthday party and need to call them immediately. We have four records in our database. If there were more records, it would be time consuming to go through all the addresses. Queries allow you to pluck only certain pieces of data out of your database. Let’s make a query to find the people in our database that are located in Houston.
- Click the Create tab in the database window.
- Click Query Wizard, and select Simple Query Wizard and click OK
- Click the downward pointing arrow on the right of the Tables/Queries: text box.
- Select Table: Addresses if not already selected.
- Select First Name, Last Name, City, and Phone# field values (click once to highlight the selection and then click the right pointing arrow or double click the selection) and move to the Selected Fields side of the window.
- Under “What title do you want for your query?” type: Houston in the text box and select the Modify the Query Design radio button.
- At the bottom half of the screen there is a grid. Under the City column and along the Criteria row, we want to type: Houston in that cell. We are making a query, which looks for only those records that include Houston – not the friends that live in Humble, for example.
- Click the Run tool (red exclamation point) on the tool bar to get the results of the query.
- The records that include Houston are displayed. Now we know who to call and their phone number.
- Click Save As à[your initials]_assignment8-1a, upload to Moodle, and close the database window.
- Close Access.
Congratulations! You have created a Microsoft Access database.
- Do the Challenge! Section at the bottom of the following link, save your file as [your initials]_assignment8-1b and upload to the Moodle shell.
- Do the Challenge! Section at the bottom of the following link, save your file as [your initials]_assignment8-1c and upload it to the Moodle shell.
- Do the Challenge! Section at the bottom of the following link, save your file as [your initials]_assignment8-1d and upload it to the Moodle shell.