office management_tool2 lect#10

58
8/7/2019 OFfice Management_Tool2 Lect#10 http://slidepdf.com/reader/full/office-managementtool2-lect10 1/58 IM Studies Peshawar University Office Management Tools# 2 Lecture# 10 MS Access Introduction Compiled by Bilal Mustafa

Upload: osama-laiq

Post on 08-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 1/58

IM Studies Peshawar University

Office Management Tools# 2

Lecture# 10

MS Access

Introduction

Compiled by Bilal Mustafa

Page 2: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 2/58

Page 3: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 3/58

MS Access Introduction

A database program lets you:

Store Information

Find Information

Analyze and Print Information

For example, you could calculate what

percent of your total sales comes from the state

of Texas.

Manage Information

Share Information

Page 4: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 4/58

MS Access Introduction

Microsoft Access database consist of sevendifferent database object types:

Tables

Queries

Forms

Reports

Pages

Macros

Modules

Page 5: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 5/58

MS Access Introduction

Page 6: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 6/58

MS Access Introduction

Page 7: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 7/58

MS Access Introduction

1- TablesTables store a database's data in rows (records)

and columns (fields).

For example, one table could store a list of customers and their addresses while another table

could store the customers' orders.

A database must always contain at least onetable where it can store information all the other 

are optional.

Page 8: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 8/58

MS Access Introduction

2- Queries Queries allow you to retrieve information from one or more tables based on a set of search conditions youdefine.

Queries ask a question of data stored in a table.

For example, a query might only display customerswho are from Lahore.

3- Forms Forms are custom screens that provide an easy way toenter and view data in a table or query.

Its an another way to populate a database is with the useof forms.

Page 9: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 9/58

MS Access Introduction

4- ReportsReports present data from a table or query in a

printed format.

5- PagesA special type of Web page designed for viewing

and working with Microsoft Access data from an

intranet or over the Internet.

Page 10: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 10/58

MS Access Introduction

6- MacrosMacros help you perform routine tasks by

automating them into a single command. For 

example, you could create a macro thatautomatically opens and prints a report.

7- Modules

Like automate tasks but by using a built-inprogramming language called Visual Basic or VB.

Modules are much more powerful and complex

than macros. .

Page 11: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 11/58

Page 12: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 12/58

Understanding the Access Program Screen

Page 13: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 13/58

The Access Program Screen

Title barDisplays the name of the program you arecurrently using (in this case, Microsoft Access).The title bar appears at the top of all Windows

programs.Menu bar

Displays a list of menus you use to give

commands to Access. Clicking a menu namedisplays a list of commands for example, clickingthe Edit menu name would display differentformatting commands.

Page 14: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 14/58

The Access Program Screen

ToolbarToolbars are short cuts they contain buttons for the

most commonly used commands (instead of 

having to wade through several menus).

The database toolbar contains buttons for the

Access commands that you will use most often,

such as opening and printing databases.

Page 15: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 15/58

The Access Program Screen

Database windowThe command center for a database, the Database

window, allows you to view, create, edit, and

modify database objects.

Objects bar

The Objects bar categorizes the different types of 

database objects. Each type of database object has

its own icon to view a type of object, click its icon

on the Objects bar.

Page 16: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 16/58

The Access Program Screen

Database objectsDatabase objects are the basic components that

make up a database. Database objects include

tables, queries, forms, reports, pages, macros, and

modules.

Status bar

Displays messages and feedback. The Status bar is

especially important in Access since it can give

you meaningful information and messages when

you are entering information into a database.

Page 17: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 17/58

The Access Program ScreenY

ou can view database objects using four differentviews: Large Icons, Small Icons, List, and Details.

Page 18: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 18/58

The Access Program ScreenY

ou can view database objects using four differentviews: Large Icons, Small Icons, List, and Details.

Page 19: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 19/58

The Access Program ScreenD

isplay two windows at the same time by selectingWindow Tile Horizontally from the menu.

Page 20: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 20/58

The Access Program ScreenD

isplay two windows at the same time by selectingWindow Tile Horizontally from the menu.

Page 21: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 21/58

The Access Program Screen

One of the many benefits of working with

Windows is that you can open and work with

several windows at once.

Page 22: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 22/58

Creating and Working with a Database

Page 23: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 23/58

Creating and Working with a Database

Planning a Database Break information as much as possible.

In the figures down below similar information stored in

a poorly designed table and in a well-designed table.

Page 24: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 24/58

Creating and Working with a Database

Planning a Database Break information as much as possible.

In the figures down below similar information stored in

a poorly designed table and in a well-designed table.

Figure -1.

Page 25: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 25/58

Creating and Working with a Database

Planning a Database Break information as much as possible.

In the figures down below similar information stored in

a poorly designed table and in a well-designed table.

Page 26: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 26/58

Creating and Working with a Database

Planning a Database Break information as much as possible.

In the figures down below similar information stored in

a poorly designed table and in a well-designed table.

Figure -2.

Page 27: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 27/58

Creating and Working with a DatabasePlanning a Database

In the first table Figure -1, you can only sort by the

name or address field.

If you sort the name field, the sort is performed by the

first name. If you sort the address field, the sort is performed by the

street.

Hence, you cannot sort by city, state, or zip code.

You couldn't create a query or filter that only displays

people from a particular state because the states are not

stored in their own field as the fields are not flexible.

Page 28: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 28/58

Creating and Working with a Database

Planning a Database

In the second table Figure -2, now you can sort

records by first name, last name, address, city,

state, and zip code.

You can also query and filter records using any

of these fields.

Page 29: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 29/58

Creating and Working with a Database

Planning a DatabaseUse multiple tables so that you don't duplicate

information.

In the figures down below similar information is stored in a

badly designed table and in a well-designed table.

Page 30: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 30/58

Creating and Working with a Database

Planning a DatabaseUse multiple tables so that you don't duplicate

information.

In the figures down below similar information is stored in a

badly designed table and in a well-designed table.

Figure -3.

Page 31: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 31/58

Creating and Working with a DatabasePlanning a Database

Use multiple tables so that you don't duplicate

information.

In the figures down below similar information is stored in a

badly designed table and in a well-designed table.

Page 32: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 32/58

Creating and Working with a DatabasePlanning a Database

Use multiple tables so that you don't duplicate

information.

In the figures down below similar information is stored in a

badly designed table and in a well-designed table.

Figure -4.

Page 33: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 33/58

Creating and Working with a Database

Planning a Database

Making changes in a good database designed can

save your lots of time and headaches later on.

Page 34: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 34/58

Creating and Working with a DatabasePlanning a Database

Guidelines for creating a well-designed database

Determine the Purpose of the Database

Determine the Tables You Need

Break up information as much as possible

Determine the Fields You Need

Determine the Primary Key

Determine the Relationship between Tables

Sketch a Diagram of Your Database

Page 35: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 35/58

Creating and Working with a Database

Planning a Database

Guidelines for creating a well-designed database

Determine the Relationship between Tables

In Figure -4, the ID field links the Customers andInvoices tables together.

One of the linked fields should be the table's

primary key also called Foreign key.

Page 36: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 36/58

Creating Databases

Page 37: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 37/58

Creating DatabasesWe can create a database in three ways:

1- Using Templates

2- Starting from Scratch

3- ³Borrowing´ a Database

Page 38: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 38/58

The easiest way to create a database is by usingone of the built-in database templates.

A database template saves your time and effort,

providing you with ready-to-use tables, forms,queries, and reports.

The available templates are contact management,

inventory, and order taking.

You can also modify a template database to

better suit your needs.

Creating a Database Using Templates

Page 39: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 39/58

Creating a Database Using Templates The New File task pane appears each time you start

Access. Select FileNew.

Page 40: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 40/58

Creating a Database Using Templates The New File task pane appears each time you startAccess.

Select FileNew.

To create a database based on a

Template, Click on My Computer

Link 

Page 41: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 41/58

Creating a Database Using Templates The New File task pane appears each time you startAccess.

Select FileNew.

Page 42: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 42/58

Creating a Database Using Templates The New File task pane appears each time you startAccess.

Select FileNew.

Page 43: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 43/58

Steps of creating Database using a database template

1. Start Microsoft Access and select File New from

the menu.

2. Click the On my computer link in the task pane and

then click the Databases tab.3. Double-click the Contact Management icon.

4. Type My Contacts and click Create.

5. Click Next to continue.

6. Click Next to accept the Database Wizard's standard

tables and fields.

Creating a Database Using Templates

Page 44: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 44/58

Steps of creating Database using a database template

7. Browse the various styles by clicking each of them

then select the style you like best and click Next.

8. Select the font style that you like best and click Next.

9. Type Khogh¶s Contact List and click Next.

10. Click Finish to create the new database.

Creating a Database Using Templates

Page 45: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 45/58

Page 46: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 46/58

2- Starting from Scratch

Page 47: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 47/58

The New File task pane appears each time you

start Access, Select File New.

2- Starting from Scratch

Page 48: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 48/58

The New File task pane appears each time you

start Access, Select File New.

Click the ³Blank database´ link 

to create a new blank database..

2- Starting from Scratch

Page 49: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 49/58

The File New Database dialog box.

2- Starting from Scratch

Page 50: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 50/58

The File New Database dialog box.

2- Starting from Scratch

Page 51: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 51/58

Step of creating Database from Scratch

1. Click the New button on the toolbar.

2. Select Blank Database from the task pane.

3. Navigate to the drive and folder where you want tosave the new database, then type My First Database

in the File name box and click Create.

4. You will notice now that there aren't any database

objects in the database yet. You will have to create all

of the database objects yourself.

2- Starting from Scratch

Page 52: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 52/58

3- ³Borrowing´ a Database

Page 53: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 53/58

The New File task pane appears each time you

start Access, Select File New.

3- ³Borrowing´ a Database

Page 54: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 54/58

The New File task pane appears each time you

start Access, Select File New.

Click on ³From existing file´

link to create a new database..

3- ³Borrowing´ a Database

Page 55: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 55/58

The New from existing file dialog box.

3- ³Borrowing´ a Database

Page 56: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 56/58

The New from existing file dialog box.

3- ³Borrowing´ a Database

Page 57: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 57/58

Steps of creating Database From Existing File

1. Click the New button on the toolbar.

2. Select From existing file from the task pane.

3. Navigate to the drive and folder where you want to

save the new database, then Select the database from

whom you want to make new database and click 

Create.

4. You will found now all the objects plus all the records

of the old database, Therefore, change the database

according to your requirements.

3- ³Borrowing´ a Database

Page 58: OFfice Management_Tool2 Lect#10

8/7/2019 OFfice Management_Tool2 Lect#10

http://slidepdf.com/reader/full/office-managementtool2-lect10 58/58

Q & A