0% found this document useful (0 votes)
3 views10 pages

Access Notes

Microsoft Access is a database application that allows users to create and manage databases composed of tables, queries, forms, and reports. Key components include defining field names, data types, and setting validation rules for data integrity. Users can create databases and tables, establish relationships, and generate queries and reports to analyze and present data effectively.

Uploaded by

kastulkasian787
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)
3 views10 pages

Access Notes

Microsoft Access is a database application that allows users to create and manage databases composed of tables, queries, forms, and reports. Key components include defining field names, data types, and setting validation rules for data integrity. Users can create databases and tables, establish relationships, and generate queries and reports to analyze and present data effectively.

Uploaded by

kastulkasian787
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/ 10

MICROSOFT ACCESS

(DATABASE APPLICATION)

Microsoft access is a program that allows you to create and manage databases.

What is database?

DATABASE is collection of related data. Or database is a place where you can store information
related to a specific topic. A Microsoft access database is made up of several components
including

1. TABLES
2. QUERIES
3. FORMS
4. REPORTS

A TABLE is a list of related information in columns and rows. In a table,

Each row is called a record/data

Each column is called a fieldname

=>FIELDNAME
Fieldnames are the smallest chunk of information in any record. Field name is the name of the
column.it should represent the contents of the field such as name, address, final grade, first name,
last name, age, gender, date etc. the name of the field cannot exceed 64 characters in length.it
many include spaces. The use of space in field name is not a good practice.

=>DATATYPE
the data type specifies the type of data that can be stored in the field. Common datatype in MS
access is number, text, currency and date etc.

Data type Use to display


Text Short, alphanumeric values, such as a last name or a street address.
Number Numeric values, such as distances. Note that there is a separate data type
for currency.
Currency Monetary values

1
Date/time Date and time values for the years 100 through 9999

=>FIELDSIZE
Field size is used to set the number of characters required in text or number field. Example: word
“KIBUNYUFU” has 9 characters, so the size of KIBUNYUFU is 9. It can be entered only in the
field name that has field size 9 or above.

HOW TO CREATE DATABASE


Open Microsoft office access

Click blank database

Write your database name

HOW TO CREATE TABLE


Table can be created into two ways

DATASHEET VIEW- used to enter data all two ways found in VIEW command

DESIGN VIEW-used to create table

STEPS

1. Click view
2. Click design view
3. Write your table name
4. Click OK
5. Set fieldname, Datatype, field size and other setting.
Example-01
Open Microsoft office access then create database called CAMPALA OPEN SCHOOL
then create table called STUDENT.

Fieldname Datatype Field size


Student ID Text 12
First name Text 35
Last name Text 35
Age Number -

2
Gender Text 20
Country Text 30
Date reg Date/time -
Password Text 8
Citizenship Text 20

Student ID First name Last name age gende country Date reg password citizenships
r
DCC111 Zawadi Juma 56 Male Tanzanite 1/4/2017 2222222 tanzanians
DCC222 Helen john 34 femal ghana 2/4/2017 333333333 tanzanians
e

Required

Set all field required to yes.

Set input mask in the field password as xxxxxx and date reg as dd/mm/yyyy.

Set default value in the field citizenship as Tanzanian.

Set lookup wizard data type in the field gender and country.

Set validation rule “DC????” In the student ID

Set validation text “wrong data” in the student ID.

Set validation Rule>=18 in the field age.

Set validation text (“tafadhali ingiza wenye umri Zaidi ya miaka 18”)

in the field age.

Set validation rule “??????” in the field password.

Set validation text “please!!!Enter only eight digits “in the field password.

Set validation rule <#01/01/2018# in the field date Reg.

3
Set validation text “please!!!!Enter year before 2024”in the field date Reg.

HOW TO SET REQUIRED, INPUT MASK, DEFAULT VALUE, LOOKUP


WIZARD DATATYPE, AND VALIDATION.
REQUIRED

Required have two options to set in the fields YES and NO

i. YES, means you must enter the data in that field without skip.
ii. NO means you may enter data in the field without any problem

Input mask

An input mask is a string of characters that indicate the formats of valid input values. You can
use input mask in the table fields, query fields and controls on forms and reports. The input mask
is stored as an object property.

The example in the following table demonstrates some ways that you can use input masks.

This inputs mask Provides these types of values


Xxxxxxxxxxxx Password
00/00/0000(dd/mm/yyyy) 02/04/2024
00-00-0000(dd-mm-yyyy) 02-04-2024
0000/00/00(yyyy/mm/dd) 2024/04/02
0000-000-00000 234-453-534312

DEFAULT VALUE
Default value is the values that appeared automatic in the field without interred. when you set
data in the field as default means you can’t enter otherwise it appeared automatic in that field.

LOOKUP WIZARD DATATYPE

The Microsoft access lookup wizard is a very useful feature. It appears as one of the field data
types, and is used for field which have a restricted list of possible values.

Examples of fields which have restricted list of value is

i. GENDER (male or female)

4
ii. MERITAL STATUS (Single or Married),
iii. COUNTRY (All list of countries) etc.

VALIDATION(Limitation)
Validation has two parts
i. Validation rule
ii. Validation text
Validation rule is rule that prevent bad data being saved in your table.
Validation text is message appeared when you enter a bad data in the table.
Validation rule and validation text examples

Validation rule Validation text


<>0 Enter a nonzero value
>=0 Value must be zero or greater or you must
enter a positive number.
>=24 Value must be greater than or equal to 20
“DC???” Enter value start with DC followed by the
four digits.

<=01/01/2024# Enter a date before 2024.

“???????” Enter value with eight digits

PRIMARY KEY AND RELATIONSHIP

What is primary key?

A primary key is the first field in each table of the database. Or a primary key is a field or set of
fields with value that are unique throughout a table. Values of the keys can be used to refer to
enter records, because each records have a different value of the key. Each table can only have
one primary key. Access can automatically create a primary key field for you create a table.

5
RELATIONSHIP
A relationship helps you to combine data from different tables. In an access desktop database,
you can create a relationship in the relationship window.
Types of relationship
i. One-to-one relationships
ii. One-to-many relationships
iii. Many-to-many relationships
STEPS TO CREATE
i. One the database tools tab, in the relationship group.

ii. Click relationship command


iii. The show table dialog box display all of the tables.
iv. Select one or more tables, and then click add. After you have finished adding tables.
v. Click close.
vi. Drag a field (the primary key) from the table to the common field (primary key) in the
other table.
vii. The edit relationships dialog box appears.
viii. To enforce referential integrity for this relationship, select the enforce referential integrity
box.
ix. Check cascade delete and cascade update option
x. Click create.
xi. When you are finished in the relationships window, click save to save your relationship
layout changes

Queries

6
Another database object is called a query. A query allows you to retrieve information from one
or more tables based on a set of search conditions you define using the table fields. for example,
if you want to know the name of the employee that has employee ID “BML007”, you could
create a query that would retrieve information from multiple tables to determine the answer.

STEPS

i. Open the database


ii. Click on the create tab
iii. Click query design
iv. Select table then click add
v. Add these fields to the query design grid
vi. Write your question in the CRITERIA field

NB: use primary key to ask variations of a question by using parameters like
[…………….:]

Example

Criteria [ENTER STUDENT ID:]

Criteria [ENTER EMPLOYEE ID:]

FORMS

A third database object is a form. Forms are an access tools that users can create to make data
entry in database table easier. Entering data directly into a table can be difficult if there is a lot
of information to enter. Like an access spreadsheet, an access table is essentially a screen field
with blank rows where a user enters records.

STEPS

i. Open the database


ii. Click on the create tab
iii. Click arrow in more form
7
iv. Click form wizard
v. Select fields by clicking sign >>in the field wizard box
vi. Click next
vii. Select the layout for the form. Your options are “columnar”,” tabula”,” datasheet”, and
“justified”. Best option is columnar
viii. Click next
ix. Enter a title for the form.
x. Select an option for the view you want to open the form in. your option is:
i. Open the form to view or enter information (opens in form view).
ii. Modify the form design (open in design view).
xi. Click finish.

How to create form button


a) Click your form then click view and select design view
b) On the design tab, in the control’s groups, insure that use control wizards is
selected.
c) On the design tab, in the control group, click button.
d) In the design grid, click where you want the command button to be inserted.
e) The command button wizard starts.
f) Follows the directions in the wizard. On the last page, click finish.
g) The wizard creates the commands button and embeds a macro in the buttons On
click property. The micro contains actions that performs the task you chose in the
wizard.

REPORTS

The final database object is the report. A report is an effective way to analyze and
present data using a specific layout. The text can be formatted in an access report,just
like it can be in word documents

8
a. Click create tab
b. Go to reports group, click report wizard.
c. Move the field to include on the report from the available fields list box to the
selected fields list box. To move all fields at once, click>>.
d. Click next>.
e. Click next>.
f. Click next>.
g. In the layout field, select the format of the report. Your options are “stepped”,
“block”, and “outline”. (Try the option to see a preview of the report layouts.)
h. In the orientation field, select whether to lay out the report in portraits or
landscape mode.
i. If you want all fields to fit on a single page, ensure the adjust the field width so all
fields fit on a page check box is marked.
j. Click next>
k. Enter a title for the report.
l. Select an option for the view you want to open the report in. your option is:
i. Preview the report (opens in print preview mode).
ii. Modify the report’s design (opens in design view).
iii. Click finish.
SWITCHBOARD MANAGER
Create a switchboard
i. On the database tools tab, in the database tools groups, click switchboard
manager.
ii. Microsoft access asks if you’d like to create a switchboard, click yes. this creates
a main switchboard.

iii. Click edit


iv. Type the name of the switchboard (switchboard name) example name of your
database
v. Click new

9
Form
Text: write name of your form
Command: select open form in add mode
Form: select your form
NB: repeat the same steps according to the number of your form
REPORTS

Text: your name of your report


Command: select open report
Report: select your report
NB: repeat the same steps according to the number of your report.

10

You might also like