Introduction to Access
Planning
Planning a database is just as important, if not more important, than entering the records. If you are creating a database, you should meet with everyone who will be using the database to find out what information they are going to need, how the fields should be defined, how the tables should relate, etc. It is much easier to do this right the first time than to go back and re-do after you have already started entering information into the table. You will create your database through the database window. The database window is used to create and edit objects contained in the current database. Objects are the basic building blocks of an Access database. This instruction teaches you how to create a table object, form object, query object and report object.
Creating a Table
-
Start MS Access by clicking on
Start
,
Programs
,
MS Office
,
MS Access
.
-
Open a blank database by clicking on
File
,
New
,
Blank Database
.
A window will display immediately so that you can name the database.
-
Click in the
File name
text box, and key in the name
of your database.
Access will automatically add the extension .mdb to indicate an Access database.
Once you name the database, the database window will appear.
-
Click on
Create table in Design view
.
This will open the Design view window.
-
Type
in the
field names
for your table.
-
Choose
the appropriate
datatypes
for your fields.
-
Click
File
,
Save
.
A "Save As" window will appear to prompt you for a Name for the table.
-
Name
your Table, click
OK
.
-
A
There is No Primary Key Defined
dialogue box will appear.
Access will ask you if you want to create a primary now. Click
Yes
.
About Primary Keys
Primary keys are used to establish relationships between tables. By pressing
Yes
, Access will create the first field as the primary key ID.
-
Note:
You can change this by highlighting the row you would like to put the primary key on.
Right-click
on the
row
and choose
primary key.
Close
the Design view window.
You will see the new table object in the Database window. Click on the Table object to view the Table.
Creating a Form
It is easier to create a form based on a table object already created.
-
From the database window,
click
on
Forms.
-
Click on
Create form by using wizard.
The form wizard window will appear.
-
Under the
Tables/Queries field,
choose
the
table object
you will be using.
-
Under Available Fields:
Highlight
the
fields
and
click
the
> arrow
to select the field(s) to be used in your form. You can also click double arrows >> to select all the fields to be used in your form.
Click
Next.
-
Choose the type of
Form layout
, click
Next
.
-
Choose the
Style,
click
Next
.
-
Name the Form,
click
Finish.
You will see the new Form object in the Database window. Click on the Form object to view the Form.
Creating A Query
It is easier to create a query based on a table object already created.
-
From the database window,
Click
on
Queries
.
-
Click on
Create query by using wizard
.
The query wizard window will appear.
-
Under the Tables/Queries field,
choose
the
table object
you will be using.
-
Under Available Fields:
Highlight
the fields and click the
> arrow
to select the field you are querying. You can also click >> to select all the fields to be queried.
Click
Next
.
-
Choose Detail or Summary Query, click
Next.
-
Name the Query
, click
Finish.
You will see the new form object in the Database window. Click on the Query object to view the Query.
Creating A Report
It is easier to create a report based on a table object already created.
-
From the database window,
click
on
Report
.
-
Click on
Create report by using wizard
.
The report wizard window will appear.
-
Under the Tables/Queries field,
choose
the
table object
you will be using.
-
Under Available Fields:
Highlight
the fields and click the
> arrow
to select the field(s) to be reported. You can also click >> to select all the fields to be reported.
Click
Next
.
-
You can
group the data
in grouping levels by choosing a selected field to add.
Click
Next.
-
You can
sort your information
based on a certain field. Choose the field(s) you would like to sort ascending or decsending order.
Click
Next.
-
Choose
the
Layout
and
Orientation
.
Click
Next.
-
Choose the
Style
.
Click
Next.
-
Name the Report
, Click
Finish.
You will see the new Report object in the Database window. Click on the
Report object
to view the Report.