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

MS access

Microsoft Access is a database management tool designed for organizing and maintaining large amounts of data, offering benefits like easy maintenance and fast retrieval. It includes components such as tables, queries, forms, and reports, and supports various data types and field properties. Users can create, modify, and manage databases and tables through a series of steps, including setting primary keys and establishing relationships between tables.

Uploaded by

Kirui Enock
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

MS access

Microsoft Access is a database management tool designed for organizing and maintaining large amounts of data, offering benefits like easy maintenance and fast retrieval. It includes components such as tables, queries, forms, and reports, and supports various data types and field properties. Users can create, modify, and manage databases and tables through a series of steps, including setting primary keys and establishing relationships between tables.

Uploaded by

Kirui Enock
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

MICROSOFT ACCESS

Microsoft access is a database tool or package which is used to prepare, organize and maintain,
usually very huge and complex amount of information
Benefits of access
 Large virtual storage for the data
 Easy maintenance
 Accurate updating
 Fast retrieval of well-organized information
Application of access
 Organization of customer addresses and their details in postal and telephone agencies
 Organization of plight information
 Organization and maintenance of employee records in the place of work
 Preparation and organization of books details in the library
 Preparation of basic programming
Example of other databases
 Fox pro
 Dbase
 Paradox
 Fox base
 Oracle etc.

LOADING MS ACCESS
Method 1
 Click start
 Point all program
 Point Microsoft office
 Click Microsoft access
Common terms used in MS access

Database
This is a single file in MS access that can be saved as a single unit of data. The database shall
consist of all the components of MS access together with their respective data.
Database window
It is the window that appear when you open access database or an access project. The window
displays shortcuts for creating a new database object/ components and opening existing ones.
Design view
It is the window that shows the design of this database object or components I. e the table,
queries, forms, report, etc. within the design view the user can create new database objects and
also modify the design of existing ones.
Design grid
This is the grid or table that is used to design/ and modify a query or filter in query design view
or the advanced filter/ sort window. On this table the user places the required field, criteria,
expression etc. for a inquest.

These are filtered records or the results which are returned after the database has been questioned
for specific records using a query.
Structure query language
Datasheet
This is the working area that contains the actual data within the components and to be specific
table. The datasheet is portioned into columns (fields) and rows (records)

Components of MS access
These components are also referred to as database objects. They are small programs that handle
specific data in a database though the data is related they include;
 The table
 The quires
 The forms
 The reports
 The macros
 The modules etc.

The table
It is the basic components of MS access that holds data in fields (columns) and records (rows).
Table may also be referred to as file for it holds basic data: it can be opened, closed, copied,
renamed, deleted etc.
The field
It is a column within the table with similar data about an entry such as person, a place, an event,
a item etc. for instance
If a table has field named city it is expected to have a list thus: London, Nairobi, Paris etc. and
not £500. When typing the field name, it accommodates up to 64 characters.
Records
This is full collection of details about an entry in a table always running in a row e.g. id no,
gender, age etc.
Primary key
This is a special field that is established to:
 Automatically increment a record after a previous one
 Check any duplication of records
 Automatically creare linking joint between or among the tables or queries in relationship.
Set up the primary key
Method 1
 Open the table
 Click home tab
 Click view and select design view
 Select the field to make primary key
 Click design tab
 Click primary key
 Save the changes
 Close the table design view

Method 2
 Open the table
 Click home tab
 Click view and select design view
 Right click the field to make primary key
 Click primary key
 Save the changes
 Close the table design view
Remove the primary key
Method 1
 Open the table
 Click home tab
 Click view and select design view
 Select the field to make primary key
 Click design tab
 Click primary key
 Save the changes
 Close the table design view

Method 2
 Open the table
 Click home tab
 Click view and select design view
 Right click the field to make primary key
 Click primary key
 Save the changes
 Close the table design view
Data types
Data types is an attribute given/ attached to field so as to check and determine the kind of data
that should be contained in the field. Each data type is again accompanied by a number of
properties.
Example of data types
Text
it determines or allows
 Labels e.g. Pete, Nairobi etc.
 Value e.g. 9012, 45.45 etc.
 Alpha numeric e.g. p.o box 500 mks etc.
This data type can allow or hold up to 255 characters including spaces. in most instances, when
no data type is chosen, text is returned as a default data type in a field.
Memo
Determine alpha-numeric data i.e. both value and labels that run into several sentences. it can
hold up to maximum of 64000 characters including spaces.
Number
Determine numerical entries especially for only the mathematical/ calculation and not monetary
values e.g. 13003 etc.
Currency
Determine data with monetary value e.g. kshs 250, £300 etc.
Dates and time
Determine chronological entries e.g. 3/5/2015, 3pm etc.
Yes or no
This data type evaluates two conditions that could results to true or false, on or off. The field
with data types shall be shown in boxes. To choose a check box is clicked to show tick inside. To
remove the tick click again and it disappears.
Auto-number
it is a numerical value MS access shall automatically increment each time new record is entered.
it is ideal when entering serial numbers.
OLE Object
OLE stands for Object Linking and Embedding. The data type is used to determine inserted
graphical data such as charts, pictures, etc. within the field.

Creating a new database


Guidelines to design a ideal database
 Study the user’s requirement in order to define all data inputs, outputs, and relationships.
 Design a draft database on a paper to determine the number of files or tables required.
 Normalize the database. This is to separate the entire information into field’s records and
table to allow easy manipulation of the database
 Set a primary key on an appropriate field to uniquely identify each records.
 Give priority to important fields especially those which should be sorting, filtering,
querying etc.

Steps to create a new database


 Open MS access
 Click office button
 Click new
 Click blank database
 Type a filename for the database
 Indicate the location to save the database
 Click create button
 You may create the table
Opening an existing database
 Open MS Access
 Click office button
 Click open
 Indicate the location to find the database
 Select the name of database
 Click the database to display
 Click open
 Open an object or create a new one
Creating a new table
 Point to note before creating a table
 Sketch and group up all the fields
 Establish appropriate data types, field, properties etc. for each field
 Establish the description for each field

Steps to create a new table


 Open the database
 Click table tab
 Click new
 Click design view
 Click ok
 Type the field name
 Enter respective data types
 Enter properties for each data type
 Enter details for description
 Click Office button
 Click save
 Type the table name
 Click ok
 Click yes or no to the primary key
 Close the table design window
 Open the new table
 Enter the records accordingly

The field properties


These are additional attributes added to field data so as to restrict the data entered within the
field. Different field types will go with different field properties

Example of Field Properties

Field size
This allows the user to set the limit to the number of character that a field should accommodate.
E.g. text data type may take 30, 15, 125 etc. number data type may take integer, long integer etc.
Format
This property will determine how information will appear on screen or print out. E.g. number
data type may have currency, scientific, percentage, etc. formats. The date/ time data type may
have long date, long time, short date, short time etc. formats.
Decimal places
For currency or number data types the user may choose a number of decimal place for the values.
input mask
When chosen or set the input mask automatically puts dates in a specific format.
This can be evident in many values found in phone number e.g. 000-000-000000 setting will put
the phone number 254733888222 as 254-733-888222
Caption
This is more detailed information about a certain field for instance student Name could have its
caption as student, name
Default value
This is the value that is set or programmed to be automatically returned if the user does not enter
any value within a field e.g. the user does not choose any data type for a field the text data type
will automatically be inserted. Or the=date0 is a default value set to return the current system
date in a date field if none is indicated.
Validation rule
It is a logical expression which is set to specify which values are to be entered into a field and
also restrict others e.g.=o and =100 indicates that only value between zero and hundred are
accepted into the field.
Validation text
This is the message that should be returned in case the validation rule above, if it is violated the
message may be reported as ‘please enter a value between 0 and 100”
Required
This will determine whether a value must be entered within a certain field. This means the field
cannot be left blank. Notice this when choosing data types and try to leave it blank, you cannot
be allowed to continue
Allow zero length
Here the user is allowed to continue even without having to enter any value within a field. A zero
value will be seen in that field.

Indexed
As a property, indexed is set to check any duplication (double entry) of the same records.

To apply a field property


 Open the table with the field to apply the property
 Click view menu
 Click design view
 Select the field to the property
 Apply appropriately from the display
To add a new record to a database
Method 1
 Open the table
 Click records menu
 Click data entry
 Enter the details in the row
 Press enter key
Method 2
 Click new record icon on the standard toolbar when the table is open
 Enter the details
 Press enter key
Note: Records can also be added into the database through;
1. The form
2. Append query

Deleting a record from the database


Method 1
 Select the record to delete
 Click home tab
 Click delete record
 Click yes

Note: records can also be deleted from a database through:


 The form
 The query
To add a new field to a table
Method 1
 Open the table
 Click home tab
 Click view and select design view
 Select the row with the field to be preceded the new field
 Click insert menu
 Click rows
 Type the field name, the data type, the properties and description
 Save the changes
 Close the table design view window
Method 2
 Open the table
 Right click the row with the field to be preceded by the new field
 Click insert column
 Double click the field header
 Type the field name
 Press enter key
Deleting a field from a table
Method 1
 Open the table
 Select the field to delete
 Click home tab
 Click delete column
 Click yes
FINDING RECORDS
 Open the table
 Click edit menu
 Click find
 type the record to be found
 Click find next button
 Click cancel button when through
Finding records using wild cards
Wild cards are characters or symbols that are attached to word bits in order to find records with
the similar ending or beginning etc. use the wild cards speeds the search of such records.
Example of wild cards
 The asterisk (*)
This can be placed before or after the word e.g.
Every*-finds words such as
Everyone
Everybody
Everything
*home-finds words such as;
Sweet home
Their home
N*-find entries beginning with N:
Nairobi
*N-finds entries ending with N:
London
 The question mark (?)
?ion-this will find entries such as
National
Calculation
Steps to find records using wild cards
 Open the table
 Click edit menu
 Click find
 Type the record to be found
 Insert the wild card appropriately
 indicates the field
 Click find next button
 Click cancel button when through

RELATIONSHIP
Sometimes the user may need to create a query but the field to make the query could be in
different tabbies or queries. A relationship is therefore required in order to accomplish this.
Relationship is a way of linking up tables and queries to enable the data among the tables or the
queries easily and sensibly be shared. A relationship is normally created to avoid an absurd
duplication of records from unlinked table or queries.
Join lines
Join lines is the link that connects two or more tables or queries. A join enable MS access detect
and compare related information in different tables or queries and determines how to display the
requested information.
Concatenated query
This is refined and sensible query that is acquired after a relationship has been established among
tables or queries.
Cartesian product query
It is a non- sensible query obtained when a relationship is not established because there is a lot of
abnormal duplication of same records.
Steps to create a relationship
 Open the database
 Click tools menu
 Click relationship
 Select the table or queries
 Click add button
 Click close button
 Drag a field from table A and place it on another in table B
 Click create button
 Repeat the above to join a third table a fourth and so forth
 Save the relationship
 Close the relationship window
 You may create a query from the relationship
Points to note before creating a relationship
 The join fields used to join two tables or queries must have same data types
 Data types such as memo may hinder a query being created from a relationship
 Sometimes a join created during query applies only for that particular query especially
joins are crated direct in the query design view
 In some instance access automatically creates joins: That is;
a) If you have two tables and each table has similar fields with same data type and same
name and a relationship has been created between the tables
b) If one of the joined field is a primary key.

To design a query from relationship


 Click queries tab
 Click view
 Click design view
 Select the tables or queries to link
 Click add button
 Click close button
 Drag the respective field into the grid
 Set/ type the criteria if necessary
 Click query menu
 Click run
 Save the query
 Close the query
Steps to delete a relationship
Method 1
 Click join lines
 Click edit menu
 Click delete
 Click yes
Method 2
 Right click a join line
 Click delete
 Click yes
 Save the changes
Method 3
 Click join lines
 Press delete key on the keyboard
 Click yes
 Save the changes

SORTING RECORDS IN THE OBJECTS:


(TABLE/ QUERY/ FORM/ REPORT)
Sorting in computer has been dealt with in the previous applications; the concept is the same in
this application
Steps to sort records
Method 1
 Position the cursor in the field to sort
 Click record menu
 Point sort
 Click ascending r descending

Method 2
 Right click the field to sort
 Click ascending or descending
FILTERING RECORDS
This is going into database to retrieve some records after supplying some criteria. Filtering in MS
access is normally done to the table. It is important for it helps retrieve specific records fast just
for reviewing at a glance. if the retrieval is often the query should be created.
Steps to filter records in table
Method 1
 Open the table with the records to filter
 Click records menu
 Point filter
 Click advanced filter/sort
 Indicate the mode of sorting
 Drag into grid the field
 Type the criteria if any
 Click filter menu
 Click apply filter/sort
Method 2
 Open the table
 Position the cursor into the field with the aspect to filter by
 Click the apply filter icon

To remove a filter
Method 1
 Click records menu
 Click remove filter
Method 2
 Click the remove filter icon at standard toolbar

QUERIES
Query is one of the database objects. it is an electronic questionnaire that delves into the database
to filter specific records, if the records meet certain criteria. A query is made from an existing
table or from another existing query. They can be used to produce forms and reports. Queries can
also be used to perform calculation on records with the database.

Steps to create a select query


 Ensure there is table or another query to base the query to be created on
 Click queries tab
 Click new
 Click design view
 Select the table or query on which base the query
 Click add button on the dialog box
 Click close button
 Drag the required fields into the grid
 Indicate this mode of sorting
 Type the criteria
 Click query menu
 Click run
 Click Office button
 Click save
 Type the query’s name
 Click ok
 Close the query

BASIC CALCULATIONS USING QUERIES


If a query has numerical data, it is very possible to work out returns for total, subtraction,
average etc. For instance if the query displays the student paying and their balance then to get the
total fee is same as payment/ balance
Steps to set calculation statement
 Create a query in design view
 Position the cursor in an empty cell among the field row
 Type an expression to achieve the required returns thus; total fees: (payment) + (balance)
 Run the query
 Save the query
 Close the query
USING TOTAL FUNCTIONS IN QUERIES
MS access has inbuilt functions that can be used to analyze records in the database. Functions
such as sum, average, minimum, count, stdev. May be used.
Steps to use a total function
 Create/ open a query in design view
 Click view menu
 Click totals (notice the total field appearing and group by each field along that row)
 Click drop down list on the required field
 Select a desired function
 Set criteria if need be
 Run the query
 Save the query
 Close the query
FORMS
Forms is a background or screen that is used to display records for easy viewing in some style
and some layout. A form can be used to enter new records into the database thus updating the
database. A form is usually created from a table or query.
Steps to a form (using a form wizard)
 Ensure there is a table or query on which to base the form to be created click forms
 Click new
 Click form wizard
 Select the table or query to base the form
 Click ok
 Select the fields to consist of the form
 Click next
 Select the layout for the form
 Click next
 Select a style for the form
 Click next
 Type the forms name
 Click finish
 Edit/ and format the form
 Close the form

REPORT
Report is a summary of details extracted from the database either from the tables or from the
queries
Like the form report display records in some grouping, some style and some layout. It can also
be used for calculation and setting expressions within the database.

Steps to a report (using the report wizard)


 Ensure there is a table or query on which to base the report to create.
 Click report
 Click new
 Click report wizard
 Select the table or query to base the report
 Click ok
 Select the field required for the report
 Click next
 Group the field if need be
 Click next
 Sort the field if need be
 Click next
 Select the format or layout for the report
 Click next
 Select a style for the report
 Click next
 Type the name for the report
 Click finish button
 Edit and format the report
 Close the report

Steps to edit and format the form


 Open the form
 Click view menu
 Click design view
 Select the area to edit or format
 Click on format
 Apply the required aspect
 Click view menu
 Click form view
Steps to edit and format the report
 Open the report
 Click view menu
 Click design view
 Select the area to edit or format
 Click format menu
 Apply the required aspects
 Click view menu
 Click layout preview
Various sections of a form or report
Form header/ report header
This part contain the title of the form or the report and is usually printed once at beginning of the
form or the report.
Page header
This contains information to be printed at the top of each page of the form or the report if the
form or the report has several pages. It could be title column heading, dates or page number. in a
form the page header will appear only when the form is printed.
Details
This is the main area or body of a form or report it usually contains controls bound to the fields
in the record source4 but can also contain unbound controls, such as label that identify a field
information that is printed for each record in the table or in the query.
Group header
This section contains information that is printed at the beginning of each field. This section will
be present only in the report and if there are grouped field.
Page footer
This section contain that information which is meant to be printed at the end of each page of a
form or a report. The information could be the page summary, page number, date etc.

Group footer
This section contains information that printed once at the end of the form or the report.
ACTION QUERIES
We already have dealt with queries. Those queries are known as select queries. We have also
learnt that queries delve into the database for specific data which meet a certain criteria or
condition. There are also other queries which go further than the select queries making changes
to the database. These are referred to as action queries. There are four action queries namely; app
and query, make table query, update query, and delete query.
Update query
This query can be used to make changes (update) to a database, for instance to increase
employees salary in job group A, B and C by a certain percentage, let’s say 10% or it can be used
to replace residents of Mombasa to Nairobi or even students indicated as not cleared to cleared;
within the database of course
Steps to update query
1. Click queries tab
2. Click new
3. Click design view
4. Click ok
5. Click the table/ query with fields to updates
6. Click add
7. Click close
8. Click query menu
9. Click update query
10. Drag the field to update into the grid
11. Type the expression that will update the records into the update to row
12. Type/ set the criteria to specify exactly which records to update
13. Click view menu
14. Click datasheet view
15. Click view menu again
16. Click design view
17. Run the query
18. Click yes to confirm the update changes
19. Save the update query design view
20. Close the design view
Append query
Append means add and therefore this query will be used to add more records into the database
usually several and specific at one go. This process may be important if similar tables exist
independently and there is need to make them one.
Steps to append query
1. Click queries tab
2. Click new
3. Click design view
4. Click ok
5. Click the table/ query to extract records to be appended
6. Click add
7. Click close
8. Click query menu
9. Click append query
10. Type/ select the name of the table into which to append new records
11. Click current database or another database
12. Click ok
13. Drag the field with records to be appended into the grid
14. Type the criteria to specify exactly which records to append
15. Click view menu
16. Click database view
17. Run the query
18. Click yes to confirm the append changes
19. Save the append query design view
20. Close the design view

Make table query


This kind of query will be used to create a new table from existing database or to be specific an
existing table. So a smaller table may be extracted from a bigger one.
Steps to make table query
1. Click queries tab
2. Click new
3. Click design view
4. Click ok
5. Click the table/ query from where to extract fields for new tables
6. Click add
7. Click close
8. Click query menu
9. Click make table query
10. Type the new table’s name
11. Click current database or another database
12. Click ok
13. Drag the field to consist of the new table into the grid
14. Type the criteria to specify exactly which records to make the new table
15. Click view menu
16. Click database view
17. Click run query
18. Click yes to confirm the make table changes
19. Save the make table query design view
20. Close the design view

You might also like