Microsoft Access Field Size Rel Queries Forms Reports

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 28

FIELD PROPERTIES

Set Field Sizes


FIELD SIZE
 Field size dictates the maximum amount of
characters that can be entered in any record
under a field in a database table.
TO SET FIELD SIZES:
 Field sizes affect the structure of a database
table.
 Therefore you are required to go to the

DESIGN VIEW of the table when setting field


sizes.
TO SET FIELD SIZE FOR A FIELD
THE FOLLOWING STEPS MUST BE
TAKEN:
1. Place the table in design view

2. click in the row in which the field name is


located in that you are going to set the field
size for.

3. go down to field properties section at the


bottom of the page, click in the field size
row and type the appropriate field size for
the field.
Points to note about field sizes:
1. You cannot enter characters in a field that
exceeds the field size you have set.
2. When setting field sizes ensure you go to
the record that has the most characters in
the field and set the field size from that.
3. In a database the following are considered
to be characters:
1. Number
2. Letter
3. Symbol
4. space
MS ACCESS
Relationships
WHAT IS A RELATIONSHIP ?

 This is the process of linking two or more tables


together using common fields.
STEPS TO CREATE RELATIONSHIP
1. click on the database tools ribbon, then
relationship

2. Add the tables to be joined in the relationship

3. click and drag the field from the principal table


over to the equivalent field in the related table.

4. click the create button on the dialog box that will


appear.
STEPS FOR EDITING A RELATIONSHIP
IN THE RELATIONSHIP WINDOW

1. click on the line that joins the tables together


until the dialog box appears.

2. hereafter you can change you join type and/or


enforce referential integrity and cascade
updated or deleted fields.
MS ACCESS
Queries
WHAT IS A QUERY?
 A query is a database tool that is used to
extract data from a database table or
existing query based on specific criterion or
criteria.
CREATING QUERIES
 To create a query in Microsoft Access you
must first click on the create ribbon then
query design.
A QUERY CAN BE CREATED IN
ACCESS USING:
 Wizard-
 Double click on the Create query by using wizard
option. In this case the wizard window will open,
select the table or query that you are going to
extract the data
 select the fields that you want to be displayed in
the query and type the title of the query,
 next it will automatically generate the
corresponding query.
 Design View-
 double click on create query in design view
 select from the dialog box the query/table that
you want to wish to generate the query from and
click on close.
 Double click on the fields that you want to enter
in the query or drag them into the field row
below.
 Ifa criterion is required click in the criteria row
below the field that you want to set it for and
type the criteria.

 Click on the query and select the type of query


that you want to create.

 Click on the run icon to run the query


STEPS TO CREATE CALCULATED
QUERY
 Double click on create query in design view, select
from the dialog box the query/table that you need to
extract the data from.

 Insert all the fields from the table to field row below
that you need for the query.

 Click in the next available cell in the field row and


enter the name of the calculated field and the
calculations.
STEPS TO CREATE CALCULATED
QUERY
 Please bear in mind:

 The calculated field name must come before a colon


(:)

 Field names used from the table/query in the


calculations must be typed inside of a pair of square
brackets ([ ]).

 Click on the run icon to run the query.


 Design View-
 double click on create query in design view
 select from the dialog box the query/table that
you want to wish to generate the query from and
click on close.
 Double click on the fields that you want to enter
in the query or drag them into the field row
below.
 Ifa criterion is required click in the criteria row
below the field that you want to set it for and
type the criteria.

 Click on the query and select the type of query


that you want to create.

 Click on the run icon to run the query


CREATE SELECT QUERIES USING THE
TOTALS OPTION
 Steps:
 Double click on create query in design view, select
from the dialog box the query/table that you want to
delete the data from.

 Insert the field that you wish to perform the action on.

 Select cross tab query from the query menu.


CREATE SELECT QUERIES USING THE
TOTALS OPTION
 Steps:
 If a criterion is required click in the criteria row below
the appropriate field type the criteria.

 Select your desired action to be performed from the


totals row, under the appropriate field.

 Click on the run icon to run the query.


STEPS TO CREATE QUERY USING
MULTIPLE TABLES
 NOTE: To select data from multiple tables the
tables need to be joined.
 Select the DATABASE TOOLS tab, then choose

RELATIONSHIPS. The SHOW TABLE window


will appear.
 Add all tables in the database, click CLOSE.

 Link the primary key to the foreign key by

clicking and dragging the PK to the FK. This


opens the EDIT RELATIONSHIPS window.
 Check ENFORCE REFERENTIAL INTEGRITY,

then click create.


MICROSOFT ACCESS
Forms
FORMS
A form is a database object that provides a
secure more aesthetically pleasing display
for data entry into a table.
 It allows you to add, update and delete

records in a table from the form.


STEPS TO CREATE A FORM USING
WIZARD
 Click the CREATE tab and select MORE forms
from the forms group. From the menu select
FORM WIZARD.
 From the first page of the form wizard select the

table or query to be used as the data source


 Select the fields you wish to have displayed on

the form, individually or all at once using the >


or >> buttons. Click NEXT.
 Select a form layout of your choice. Click NEXT.

 Select a style of your choice. Click NEXT.

 Name the form.

 Click FINISH.
MICROSOFT ACCESS
Reports
REPORTS
 Reports are used to organize and group
information from tables/queries and format
the data in a way suitable for online viewing
or for printing from the database.
STEPS TO CREATE REPORTS USING
WIZARD
 Select CREATE tab, then click the REPORT
WIZARD.
 Select the table/queries to be used as the

DATA SOURCE for the report.


 Select the fields required.

 Select the grouping level.

 Sort the records by a specific field

 Choose a layout

 Choose a style

 Name your report Click finish

You might also like