Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

MS Acess

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

JUN

17

MICROSOFT ACCESS NOTES


MICROSOFT ACCESS
Microsoft Access is an example of a database program.
A database is an organized collection of related data stored in a standardized format,
and designed to be shared by multiple users.
Examples of Database programs include:
1. Microsoft Access
2. MySQL
3. Microsoft SQL Server
4. Oracle
5. FoxPro
6. PostgreSQL
7. FileMaker
8. dBASE
Uses of Databases
1. Schools use databases to keep a record of students and teachers.
2. Databases are used in hospitals to keep a record of patients’ details.
3. Libraries use databases to keep a record of the books that members of the public
borrow.
4. Police stations use databases to keep a record of criminals.
5. Used in businesses: The business world depends on databases for; inventory, order
processing, payroll, accounting, shipping and transportation, etc.
DATABASE TERMINOLOGIES
1. Database: An organized collection of related data that is commonly stored as a table in
a file.
2. Field: This is a character or a logical combination of characters that represent a data
item e.g. in a class list the Admission Number is a field.
3. Record: This is a collection of related fields that represent a single entity e.g. student
name, sex, age, marks, etc.
4. Table: This is a database structure that is used to hold related records.
5. Query: This is a tool used to search for or question a database on specific records.
6. Form: This is a graphical interphase that resembles the ordinary paper form used to
collect data. It enables the user to view and enter data into a table.
7. Report: This is a tool that offers a way to view, format and summarize the information
in your database.
8. Macro: This tool enables the user to automate frequently performed procedures or
tasks.
9. Field Name: This is used to identify the data stored in a field. A field name should be
descriptive of the data to be entered.
10. Primary Key: It is a field that enforces uniqueness in a table so that one record is not
entered twice.
PROCEDURE FOR CREATING A DATABASE IN MS ACCESS
1. Open Microsoft Access.
2. Click the Office Button.
3. Click New.
4. In the File Name box, type the name of the database.
5. Click Create.
PROCEDURE FOR CREATING A TABLE IN DESIGN VIEW
1. Click Create tab.
2. Click Table Design.
3. Enter the Field Names and their respective Data Types.
4. Set one of the fields as the Primary Key.
5. Close the table to Save it with a name.

FIELD DATA TYPES


A field data type defines the type of data the field will contain. The data types include:
1. Text: It includes alphabetic letters, numbers, spaces, punctuation, etc. This data type is
used in a field that needs no calculations.
2. Number: This field is made up of numeric numbers 0-9 that are to be manipulated
mathematically.
3. Memo: This is made up of alphanumeric data used if you need to enter several
paragraphs of text.
4. Date/ Time: It is used to identify a field as either a date or time. This is because
date/time values can be manipulated mathematically in a database.
5. Currency: It is used to identify numeric values that have decimals or fractions. It is
used especially when dealing with monetary values.
6. Autonumber: This is a numeric value used if you want Ms-Access to automatically
increment the values in the field.
7. Yes/ No: This is a logical field where an entry is either a “Yes” or “No”, “True” or
“False”.
ENTERING RECORDS INTO THE TABLE
1. Right click on the name of the table.
2. Click Open.
3. Type the individual records into the table.
CREATING A QUERY IN DESIGN VIEW
1. Click Create tab.
2. Click Query Design.
3. In the Show Table dialog box, select a table, and then click Add.
4. Close the Show Table dialog box.
5. Drag and drop all the field names along the Field Row.
6. Specify the criteria you want to use.
7. Click Design tab, and then click Run.
8. Save the query with a specific name.
CRITERIA USED WHEN DESIGNING QUERIES
1. Selecting names beginning with a given name i.e. M type M*
2. Selecting names ending with a given letter i.e. Y type * Y
3. Selecting names having one letter in common i.e. O type *O*
4. Selecting names beginning and ending with given letters i.e. begin with M and end with
Y type M * Y
5. Finding numbers above a given number i.e. >Number type >10000
6. Finding numbers below a given number i.e. <Number type <5000
7. Selecting all Females type *FEMALE
8. Selecting all Males type MALE*
9. BETWEEN
10. AND
11. NOT
12. <= , >=
13. #
PERFORMING CALCULATIONS IN A QUERY
1. Open your query in design view.
2. In the Field row, type an expression that includes a field name e.g. Amount:
[Quantity] * [Price]
3. Click Design tab, then click Run.
4. Save the query with a name.
PROTECTING A DATABASE WITH A PASSWORD
1. Open Microsoft Office Access.
2. Click the Office Button, and then click Open.
3. Click on the name of your database.
4. Click on Open Exclusive.
5. Click Database Tools tab, and then click Encrypt with Password.
6. Enter the password, and then verify the same password.
7. Click OK.
CREATING A FORM BY USING THE FORM WIZARD
1. Click Create tab.
2. Click More Forms.
3. Click Form Wizard.
4. Select the Table/Query you want to create a form for.
5. From the Available Fields column, click on >> to add all the fields to the Selected
Fields column.
6. Click Next.
7. From the layout dialog box, select the layout you wish to use e.g. Columnar,
Tabular, etc.
8. Click Next.
9. From the Styles dialog box, select one of the available styles.
10. Click Next.
11. Type the Title for your form.
12. Click Finish.

CREATING A REPORT BY USING THE REPORT WIZARD


1. Click Create tab.
2. Click Report Wizard.
3. Select the table/ query you want to use to create the report.
4. From the Available Fields column, click on >> to add all the fields to the Selected
Fields column.
5. Click Next.
6. Add a Grouping level, and then click Next (optional)
7. Sort the records by one or more fields, and then click Next.
8. Select the Layout e.g. Columnar, Tabular, etc.
9. Select the Orientation e.g. Portrait, Landscape, etc.
10. Click Next.
11. Select one of the available Styles, and then click Next.
12. Type the Title for your report.
13. Click Finish.

MACROS
It is possible to automate frequently performed procedures or tasks using a database
component known as a macro.
For example, if you frequently use a particular form when you start a database program,
you need to create a macro that automates the opening of the form.
CREATING A MACRO
1. Click Create tab.
2. Click on Macro.
3. Under Action, specify the action you want the macro to perform e.g. OpenForm,
OpenQuery, OpenReport, etc.
4. Under Action Arguments, specify the object name.
5. Under View, specify the type of view to open the object in.
6. Close the macro to Save it with a name.
7. Right click on the macro, and then click Run.

SUM DATA BY USING A TOTAL ROW IN QUERIES


You can add a Total row to a query by opening your query in Datasheet View, adding
the row, and then selecting the aggregate function that you want to use, such as Sum,
Min, Max or Avg.
ADD A TOTAL ROW
1. Make sure that your query is open in Datasheet view. To do so, right-click the
document tab for the query and click Datasheet View.
2. On the Home tab, in the Records group, click Totals. NB: A new Total row appears in
your datasheet.
3. In the Total row, click the cell in the field that you want to total, and then select the
function that you want to use from the list e.g. Sum, Average, etc.

TABLE RELATIONSHIPS IN MS ACCESS


When you use fields from more than one table in a query, there should be a common
link or relationship between the tables.
There are 3 types of table relationships:
One-to- One relationship
One-to-Many relationship
Many-to-Many relationship
1. One-to-One relationship
For a particular field in one table, there is only one matching record in the related table
and vice versa.
2. One-to-Many relationship
In a one-to-many relationship, for a particular field in one table, there are several
matching records in another table.
3. Many-to-Many relationship
In a many-to-many relationship, for particular records in one table, there are several
matching records in the other table and vice versa.
Defining Relationship between Tables
1. Click Database Tools tab, in the Show/Hide group, click Relationships.
2. Select one or more tables and then click Add.
3. Close the Show Table dialog box.
4. Click on the common field and drag it to the second table. NB: The fields used to create
the relationship must be of the same data type and properties.
5. In the Edit Relationships dialog box, click Create.
6. Click Close, and then click “Yes” to save the relationship.

You might also like