0% found this document useful (0 votes)
33 views

Create A New Database Create Tables Create Records Create Forms Create Queries Create Reports

The document provides instructions for creating a basic Microsoft Access 2007 database. It describes how to create a new blank database, add tables to store data, enter records into the tables, build forms to view and enter data, write queries to extract specific information, and generate reports to output data. The steps include naming fields, setting a primary key, entering sample data, and saving the various database objects with descriptive names.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Create A New Database Create Tables Create Records Create Forms Create Queries Create Reports

The document provides instructions for creating a basic Microsoft Access 2007 database. It describes how to create a new blank database, add tables to store data, enter records into the tables, build forms to view and enter data, write queries to extract specific information, and generate reports to output data. The steps include naming fields, setting a primary key, entering sample data, and saving the various database objects with descriptive names.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Database Basics – Microsoft Access 2007

In this section, you'll learn how to:


Create a new database
Create tables
Create records
Create forms
Create queries
Create reports

Create a new database


Open Microsoft Access. It should look like this:

Click Blank Database.


Click the icon as below diagram.

In the File name box, type: Friends

Click the “OK” button

Page 2 of 28
Click the “Create” button as below diagram.

The window for the Friends database should open:

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.

Page 3 of 28
Query
Form

Table Table

Report

Click the Create tab.

Create tables
Click the Datasheet tab.

Page 4 of 28
In the Ribbon, click View.

When the menu appears, click Design View.

When the Save As window appears, type: Friends of Mine in the Table Name box, as
below diagram.

Then click the “OK” button

Page 5 of 28
Name fields
Click in the second box beneath Field Name.

Type: First Name


Press the ENTER key on your keyboard. The table should look like this:

Click in the next box beneath First Name.


Type Last Name then press the ENTER key.
In the next box down, type: City then press ENTER.
In the next box down, type: Zip then press ENTER.
In the next box down, type: Phone Number then press ENTER.

Page 6 of 28
The table should now look like this:

Notice the icon beside the ID field.

This means the ID field is the table's "key" field.


What is the key field?
A table's key field cannot 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 Abu Bakar Omar, it can easily
distinguish Abu Bakar Omar, ID #326 in for a checkup, from Abu Bakar Omar, ID
#298 who needs a heart operation.

Page 7 of 28
Create records
In the Ribbon, click View, then Datasheet View.

When the alert window appears, click the “Yes” button as below diagram.

Click in the box under the First Name column header.

Page 8 of 28
Type: Elvis then press the TAB key on your keyboard. The table should now look like
this:

Type: Presley then press the TAB key.


Type: Baltimore then press TAB
Type: 21212 then press TAB.
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

Page 9 of 28
Add new fields
Right-click the Zip column heading.

When the menu appears, click Insert Column as below diagram.

Page 10 of 28
Right-click the column heading. When the menu appears, click Rename Column.

Type: State then press the ENTER key.


Click inside the new State field for the first record.
Type: MD then press TAB until the cursor moves down to a new record.

Record number 1 is saved and complete.

On the Title Bar, click the icon as below.

Create forms
Click the Create tab.

Page 11 of 28
In the Ribbon, click Form.

The new form for the Friends of Mine table should look like this:

Add a new record


In the form window, click the button

Page 12 of 28
Page 13 of 28
A blank record should appear:

TIP: If you see a Security Warning bar above the form...

Page 14 of 28
Click the “Options” button...When the Microsoft Office Security Options window
appears, click the Enable this content radio button as below diagram.

...then click the “OK” button.

In the Ribbon, click View, then Form View.

Page 15 of 28
Click the First Name box.

Type: Bo then press the TAB key.


Type: Diddley then press the TAB key.
Type: Richmond then press the TAB key.
Type: VA then press the TAB key.
Type: 23220 then press the TAB key.
Type: 8005557890.

The form should now look like this:

Page 16 of 28
Press the TAB key again.
The form should progress to a new, blank record:

The old record has been saved. In the Navigation Pane, double-click the Friends of
Mine table.

Page 17 of 28
It should look like this:

Create queries
What's a query?
A query is a way to get specific information from the database.
Essentially, it's a question. You use queries to ask the database things like, "Who
are my customers in Penang?", or "How many packets of kerepeks have I sold this
month?"

Click the Create tab. In the Ribbon, click Query Wizard.

When the New Query window appears, make sure Simple Query Wizard is selected.

Then click the “OK” button.

Page 18 of 28
When the Simple Query Wizard opens, double-click First Name in the Available
Fields list.

First Name should appear in the Selected Fields column:

Page 19 of 28
Click the button. This should add the Last Name field to the Selected Fields list:

Double-click Phone Number. This should add the Phone Number field to the
Selected Fields list:

Page 20 of 28
When the final screen appears, type: Names and Numbers as below diagram

Click the “Finish” button.

The query is automatically saved and executed. It should look like this:

Create reports
In the Ribbon, click Report Wizard.

Page 21 of 28
When the Report Wizard window appears, click the Tables/Queries drop-down
arrow. When the list appears, click Table: Friends of Mine.

Click the button to move all the fields into the Selected Fields list.

Page 22 of 28
In the Selected Fields list box, click ID, then click the button.

The ID field should already be removed. The report wizard should now look like this:

Click the “Next” button.

Page 23 of 28
When the next screen appears, click “Next” the button.

When the next screen appears, click the first drop-down arrow, and then click State in
the list.

Click the button. Choose layout and style.

When the next screen appears, make sure Tabular is checked in the Layout section.

Then click the button.

Page 24 of 28
When the next screen appears, click Equity in the list of available styles.

Then click the button.

View the report


When the final screen appears, type: My Friends in the box.

Then click the Preview the report radio button.

Click the button.

Page 25 of 28
The report is automatically created, saved and opened. It should look like this:

Save your work before exiting Access.

Database Basics Exercise


This exercise need to submit to me by email. Email to [email protected] by 16th
September 2009

 Open Microsoft Access.
 Create a blank Access database in the Practice Access Files folder called Music
Library.
 Create a new table with these fields:
a. CD Title
b. Artist
c. Genre
d. Date Purchased
e. Number of Songs

TIP: Do this in Design View.

 Save the table as CDs. Allow Access to create a Primary Key.


 Rename the ID field (the Primary Key) Album ID.
 Enter these data into the table to create the first record:
CD Title: Pearls on a String
Artist: Dusty Trails
Genre: Folk
Date purchased: 05/10/2001
Number of Songs: 14
Notes: Create more datas (min 20 records) using your own favorite singer

TIP: Do this in Datasheet View.

Page 26 of 28
It should look like this:

 Close the CDs table.


 Create a form for inputting data into the CDs table.
 Save it as CDs Table Data Input.

It should look like this:

 Use the form to enter information for four more CDs.


TIP: Feel free to make things up.

 Create a query that pulls out this information:


o CD Title
o Genre
o Number of Songs
o
 Save the query as Quick CD Notes.
 Run the query. It should look like this:

Page 27 of 28
 Create a report based on the CDs table.
 Include all the fields of the CDs table in the report, and sort the records based
 on Genre.
TIP: Format the report using the Flow style.

Name the report CD Inventory. It should look like this:

Page 28 of 28

You might also like