COMPUTER STUDIES
NOTES
FORM 2
Editing a relationship
Editing tables
As you learnt in word processing and spreadsheets, we have similar editing feature for Ms Access. These
include copy, paste, sorting, deleting, adding data and formatting.
Queries
A query is a set of instructions used to select records from one or more tables based on a certain criteria.
The records selected are called a dynaset and can be viewed, analyzed and sorted. The queries are very
useful for creating user defined data which can be exported and used in other applications.
Types of Queries
There are several types of queries:
1. Select queries: It's used to extract data from tables based on a criterion or specified value.
2. Action queries:
- Update queries : It makes changes to a group of records or all records in one or more tables.
- Append queries : Adds a group of records from one or more table to the end of another table. The
tables do not need to have the same number of fields for them to be merged.- Delete queries : It deletes
a group of records from one or more tables.
- Make table queries : Creates a new table from one or more tables.
3.Cross tab queries : It calculates and restructures tables to make it easy for analysis.
Creating a Query
Creating a select query using design view
Formatting data and controls in a form in design view
Since you have already come across formatting in word processing and spreadsheet this area will be
easier to handle. To make any changes in the form you must do it in design view. Under the design grid
you select the text or object go to properties to effect desired change.
Creating Reports
These are records that are related in a predefined order. E.g. grandparent, parents, children. In this
model, each record has one parent record and many children. The level below is subordinate the one
above it. Its also known as tree model.
Bound and Unbound Controls4
Bound controls
They are in direct connection with a database. They enter data in the database or show data from the
database. They can change data, or they can show changes in data as those occur. If you want a control
in a form or report to be a bound control, first make sure that the form or report is based on a table or
query. Examples of these controls include text boxes, List boxes and combo boxes.
Unbound controls
They display information that does not originate from a table or a query. Examples include labels, lines,
rectangles, and pictures
Calculated controls
They do not display data that is stored in a table or query. Instead they are used to display calculated
values and may contain a formula of an expression e.g. = [Marks]*0.75. They perform calculations using
database data, but they do not change it.Text box: - Are used to display and accept a wide variety of data
e.g. names, addresses and admission number.
List box: - A control that displays options of values from which the user can choose one value.
Combo box: - it is like a list box and text box combined into one control. It allows the user either to type a
value or select a value form a list of option.
Label: - Used to display descriptive text such as headings on a form, column titles, captions or brief
instructions. They do not display values from a field or expression. They are static, they do not change s
you move form record to record. They are automatically included when most controls are created.
Command: - Use to execute stored procedure e.g. save, Exit, print
Option: - Used to select one of the two items provided. When having more than two items option groups is
used.
Check box: Used to select one or more of the items provided ) end of text to be hyperlinked.
Calculated field
Calculated controls are used to manipulate values. They display the result of an expression. An
expression is a combination of arithmetic and Boolean operators, field names, functions and constant
values and the expression must begin with an equal sign. The fields generated are called calculated field.
Manipulating data using a form
Step 1
In form design view, drag and drop the text box control into the detail grid.
Step 2: Either delete the Label section or label the text box then type the expression directly into the text
box control. For example, the sum of the students Total mark can be calculated by using the expression =
SUM (marks), Student total score can be calculated using =Eng+Maths+Kiswahili.
Other examples of expressions include:
= date ( ): - Returns the current date according to the system clock
= now ( ): - Returns the current date and time
=date ( ) + 10: - Adds 10 days to the current date
= [first name] & “ ”& [last name]: - Joins the first name with the last name with a space between the two
fields
= [marks] * 0.75: - multiplies the marks by 0.75
Step 3: Click on form view on the view menu.
A report is a summary of analyzed data that is output in a predefined format.
A report has the following sections
Report header: - It is at the beginning of the report. It contains the name of the report and describes the
information listed in it.
Page header: appears just below the report header and displays column headings and page numbers
Group header and footer: - If records are sorted into groups based on a common value, the group header
is placed at the start of every group while the group footer after the last record of the group.
Detail section: it contains data for each record.
Report Footer: - It appears at the bottom of the last page of the report before the page footer of that page.
It contains summary information such as grand totals.
Page footer: - Last item on each page of the report. It contains a page number or other descriptive
information.
Creating Reports
A report has the following sections:
Page header: Appears just below the report header and displays column headings and page numbers
Report footer: -It appears at the bottom of the last page of the report before the page footer of that page.
It contains summary information such as grand totals.
Page Footer: - Last item on each page of the report. It contains a page number or other descriptive
information.
How to create a report
Step 1: Click on Reports under the database window.
Step 2: Click on Design View button and select new. A dialogue box appears. Click on Design view then
choose the table or query where the data will come from. A design report window appears.
Step 3: Drag and drop the fields in the table or query shown in the window to the detail grid.
Step 4: Move the labels to the page header so that they are not repeated in a tabular report format.
Step 5: In the report header and footer section insert user defined text that will be common in all reports.
Step 5: Go to view on the menu bar and click on Print preview.
Internet
Internet is defined as a network of networks that connects computers worldwide via a huge set of
telecommunication links. It is a global network connecting millions of computers.
By the end of this lesson, you should be able to define:
1. Define internet.
2. Explain the development of internet
3. Explain the importance of internet
4. Describe internet connectivity.
5. Identify internet Services
6. Access internet
By the end of this lesson, you should be able to define:
Introduction
In the old days, people used to communicate in different ways. Messengers used to carry letters to far
away lands often crossing rivers and going through forests.
Click on the links above to see development of internet.
Development of internet
Origin of internet
The department of defense in the USA realized that they had mainly two problems to solve i.e. 1. To
share research among military, industry, and university sources. 2. To provide a diversified system for
sustaining communication among military units in the event of nuclear attack.
Importance of internet
Given that internet is a network, it can be used by various categories of people in different fields including
educational institutions, commerce, nonprofit making organizations therefore is important in the following
ways:
(i) A lot of information is available on the internet on virtually any topic
ii) Information can be easily updated.
(iii) It allows people to telecommute.This means that people can work from home using internet facilities
like e-mail and keep in touch cheaply and quickly with friends and relatives
(iv) It is convenient for many common activities like paying bills, booking flights, checking bank balances
among others.
Internet connection requirements
How do computers communicate to each other? They must be connected to one another through
bounded or unbounded media. In order to connect to the internet one need s a number of things.
a. Internet Connectivity
Telecommunication facilities such as modems short for modulator, demodulator which converts a digital
bit stream into an analogue signal suitable for transmission over some analogue communication channel
and back into digital signals.
b. Internet Service Providers
Such as Global Swift, Swift Kenya, Jambonet, all mobile operators among others. They povide internet
services at a fee.
c. Internet Software browsers
Examples of these are:
Internet Explorer, Mozilla among others