Ms-Access
v Microsoft Access 2007 is a Relational Data Base
management System (RDBMS) Which provide the facility to the user for store and
manage the data in data. It is developed by the Microsoft Corporation and it is
a part of Ms-Office. Its latest version is 2010.
v RDBMS (Rational Data Base Management System):-
v RDBMS is a technique which defines the relation
between more than one tables in RDBMS stored data in tabular form which is also
called table or data base.
v Data: - It is collection of Alphabet, Number, Text,
Symbol etc.
v Field: - it is the smallest unit which pretends the
value.
v Record: - Collection of fields is called record.
v Table: - Collection of Records is called table.
v Data Base: - Database is collection of records.
v Extension:- There Extension of Ms Access file is .MDB
Note: - Main components of Ms Access like table, Query, Form,
and Report & Macro.
v Data type:- Data types are used to specify which type of value
you input into a field.
v Types of
data types used in Ms- Access.
Ø Text Yes/No
Ø Number Memo
Ø Auto Number Hyperlink
Ø Currency OLE
Object
Ø Data/ Time Look
up wizard
v How will you
open Ms-Access window?
Ø Ans:- Click on Start button
Ø Click on all program option.
Ø Click on Microsoft Office option.
Ø Click on Microsoft Office Access 2007
Ø Finally Ms- Access 2007 program window will be open.
v Before
Creating a Database:-
Ø Please keep the following points in mind.
Ø Purpose of the database.
Ø Determine the table.
Ø Determine the fields & their Data types.
Ø Specify any one field uniquely identify all the
records of a table.
Ø And store the records property into the table.
v For
Create a New Database:-
Ø Click on Office button
Ø A drop down list will be appears.
Ø Click on New option
Ø Then a new window will be open.
Ø Click on Blank database will be created by that
specified name
v For
Create a new table (Using Data Sheet View):-
Ø Select Create tab
Ø Click on table button under the trebles group
Ø Double click on ID filed & Rename it.
Ø And then double click on add new filed & Also
remove it.
Ø And using above given
Ø Process by double click on add new field each times
you may specify the fields name for the table as per your need.
Ø Click on Save Button
Ø Enter a name
Ø Click on Ok button
Ø Close the Datasheet window
Ø Finally a table will be created into the database.
v For
Cerate a new table (Using Design View):-
Ø Select Create Tab
Ø Click on Table Design Button under the table group.
Ø A design view window will be open.
Ø Enter the fields name & specify their appropriate
data type.
Ø And also specify the properties of each field’s one by
one as per your need.
Ø Click on Save button
Ø Enter a name
Ø Click on ok button
Ø It will ask to apply primary; key.
Ø Click on No Button
Ø Click on The Design View window
Ø Finally a table will be created into the Database.
Note:-
Process for Create Library Database:-
Ø In library data base create the following tables
like:-
Ø 1. Book
Table:-
Ø Field
Name Data Type
Book Code text
Book Name “
Author Name “
Publisher Name “
No. Of Copy Number
Date of Purchase Data/Time
Price Number
Remark Memo
Member
Table
Field
Name Data
Type
Member Code Text
Address “
Contact No. “
Date of joining Date Time
Membership Type Look up wizard
Joining Fee Number
Remark Memo
Issue
Table:-
Field
Name Data
Type:-
Book Code Text
Member Code “
Date of Issue Date Time
Schedule Dare of Return “
Return Date “
Fine Collected Number
Remark Memo
Create
Following Database:-
Item
Table:-
Field
Name Data
Type
Item Code Text
Item Name “
Quantity Number
Rate “
Mfg Date Date Time
Expire Date “
Remarks Memo
Employed
Table:-
Field
Name Data
Type
Emp. Code Text
Emp. Name “
Post “
Department “
Basic salary “
Remark Memo
Mark
Sheet Table:-
Field
Name Date
Type
Roll No Text
Student Name Number
Math “
HND “
ENG “
SNK “
SSC “
NCS “
VOC “
Total “
Customer
Table:-
Field
Name Data
Type
Customer Code Text
Customer Name “
Father Name “
Address “
City Look
up wizard
State “
Pin Code “
Contact Number “
E-mail Address “
Remark Memo
Course
Table
Field
Name Date
Type
Course code Text
Course Name “
Duration Look up wizard
Course Fee Number
Remarks Memo
v Primary
Key:- Primary key is a key (Field
)Which uniquely Identify the particular records into the table.
v Note:- Primary key cannot contain null value or blank value.
v For
Primary Key:-
Ø First of all select the table under the navigation
pane in which you want to apply primary key.
Ø Click Right mouse button.
Ø A short cut menu will be open
Ø Select “Design view”
Ø Design view window will be open
Ø Select the field name
Ø Select Design tab
Ø Click on primary key button under the tools group
Ø Click on save button
Ø Close the Design view window
Ø Finally primary key will be applied on the selected
fields into the table.
v Foreign
key:- It two tables (say book
tables & Issue table both have a common field book code if the book code
field of book table is assigned as primary key then the book code field of
issue table will be automatically assigned as foreign key.
v Relationship:-
Relationship is used to combine two or more
tables with each other into the Database.
v Type of
Relationship used in Ms-Access.
Ø One too One
Ø One too Many
Ø Many too Many
v One too
One:- In one to one relationship
both sides single entities are exists.
v One too
Many:- One too many in one too many
relationship one sides single entity & another side multiple entities are
exists.
v Many too
Many:- In many to many
relationship both side multiple entities are exists.
v For
Creating Relationship:-
Ø First of all open the library database
Ø Select Database tools tab.
Ø A relationship window will be open with a show table
dialog box
Ø Select book member &Issue table in it & click
on add button to add a field list box of these tables into the relationship
window & then drag it & then close it
Ø Arrange the field list box in it as you like.
Ø Select the book code field from the book table field
list box & then drag it & drop on the book code.
Ø Field of issue table.
Ø A Edit Relationship dialog box will be open.
Ø Check the Enforce Referential integrity chick box.
Ø Check the cascade up dater and cascade delete check
box in it.
Ø See the type of relation made between the tables in
its relation type box.
Ø Click on create button.
Ø Finally relationship between book table & issue
table will be created.
Ø Now using above given process your may create
relationship between member table and issue table.
Ø Click on Save Button.
Ø Close the relationship window
Ø Now check the relationship
v Query:- Query is used to filter the necessary records from
the table by given conditions.
v There are
two type of query used in access.
Ø Select
Query
Ø Action
Query
v Select Query:-
Select query is used to retrieve the
records from the table which will meet the given specified condition.
v Action
Query:- Action Query is used to
manipulate the records of a table. So, it is also called Data manipulation
query.
v Type of
Action Query:-
Ø Update Query
Ø Delete Query
Ø Append Query
Ø Cross tab Query
Ø Make table query
v Update
Query:- Update query is used to
update or modify the records of a table which full fill the given specified
condition.
v Delete
Query:- Delete Query is used to
delete all or only those records from the table which full fill the given
specified condition.
v Append Query:- Append query is used to input the records from a
table into the records from the table should be same that means their field
name date type and properties should be matched otherwise append query will not
work.
v Cross tab
Query:- Cross tab query is used to
summarize and calculate the records of a table.
v Make table
query:- Make table query is used to
make a table into the data base using the records filtered from the another
specified table.
v To Make a
select query (Using simple query Wizard):-
Ø Select create tab
Ø Click on Query wizard button under the other group.
Ø New query dialog box will be open
Ø Select “Simple query wizard” in it
Ø Click on Ok button
Ø A simple query wizard dialog box will be open
Ø Specify the table name from which you want to filter
the records.
Ø All field of the selected table will be displayed into
the Available field’s list box.
Ø Select the fields one by one from the available field’s
list box & click on add button to add them into the selected field list box
only. Those you want to retrieve from the table.
Ø Click on Next
Ø Enter a name to save the query.
Ø Click on Next.
Ø Click on Finish
Ø Finally a select query will be made into the data
base.
To
make a select query (Using Design View):-
Ø Select Create tab
Ø Click on query design button under the others group.
Ø A query design view window will be open with a show
table dialog box
Ø Select the table name
Ø Click on Add button.
Ø Click on close.
Ø A field list box of that selected table will be added
into the Design view windows.
Ø Select the fields one by one from the field’s list box
& then drag it & drop the field column of the design window of which
records only you want to retrieve from the table.
Ø And the specify the condition on any one fields in its
criteria range cell.
Ø Click on save button.
Ø Enter a name.
Ø Click on ok.
Ø Close the Design view window
Ø Finally a selected query will be made into the
database.
Ø Calculation
in Query:-
Ø Calculate
the following fields of item table in the query Design:-
Amount:[Amount]*[Rate]
Rebate:[Amount]*20/100
Tax amount:[amount]-[Rebate]*12.5/100
Net Amount:[Amount]-[Rebate]+[Tax
Amount]
Ø Calculate
the following fields of employee table in query design:-
HRA:[basic SALARY] *25/100
DA:[BASIC SALARY]*35/100
TA:[BASIC SALARY]*18/100
OA:[Basic salary]*[HRA][DA]+[TA]+[OA]
PF: (basic SALARY]*22/100
NET SALARY:[TOTAL]-[PF]
Ø Calculate
the following fields of employee table in query design:-
Obtained
mark:[Math]+[Hnd]+[Snk]+[Nsc]+[Ssc]
Y mark: [obtained marks]/[Total]*100
Division: if [%marks]>=75,”Division”,
If [%marks]>=60,”first div”,
If [%marks]>=45,”2nd div”
If[%marks]<,Fail))))
Ø Calculate
the following fields of book table in query Division:-
Amount:[No of Copy]*Price
Discount:[Amount]*30/100
Net amount:[amount]+[Discount]
Ø Calculate
the following field of issue table in query design:-
Fine Amount:[Date value/Return Date]
Date value ([Schedule Date of
Return]))*5
v Form: - Form is an interfaced which is use to establish the
relation between computer and user.
v In Ms-Access, form is mainly used for input, view,
modify and Delete the table records.
v Components
of form:-
(1) Label (2)
Text Box (3) List Box (4) Combo Box (5)
Radio Button
(6) Check Box (7) Image (8) Command Button etc.
v Label: - it is mainly used place the text on the form. It is
also called output box that means after execution of the form the value of a
label cannot be changed.
v Text Box:- It is mainly used to accept the information from the
user. It is also called input box & after execution of the form value of a
text box can be changed or modified.
v List Box: - If display the list items from where you many select
multiple. at an item.
v Combo Box: - it is the combination of text box & list box. If
also display the list of items from where you many select only one item at a
item.
v Radio
Button:- it is used to display the
group of options from where you many select only one option at a time. It is
also called option button.
v Check box:- It is also used to displayed group of options from
where you many select multiple option at a time.
v Image:- it is used to place the images on the form.
v Command button:
- It is also called push button when
a user check on a button then the action initiated on the button will be
executed.
It is mainly used to execute
a set of instructions.
To create a form (Using Design view):-
For form Design:-
Ø Click Create tab
Ø Now go to form design button
Ø Now a form design window will be open.
Ø Then go to tools group
Ø And then click on add existing field button.
Ø Now a field list task pane will be open in right side
of the window. With all created table name.
Ø Now drag the table field one by one and drop on form
design window.
Ø After add all fields then arrange and format the
inserted field.
Ø Now click right mouse button in form design window and
click on form header/ footer option.
Ø Then a header and footer field will be added in design
window.
Ø Now click on label tool Aa button in control group.
Ø Now drag and drop the mouse pointer in header field
and then type the header Mather and format it.
Ø Same Process done for specify footer matter.
Ø Now save the form with given name.
For
Create command button on the form.
Ø First of open the form design window.
Ø Now click on design tab.
Ø Go to controls group.
Ø Click on “Button” button
Ø Now drag and drop the mouse pointer on the page.
Ø Command button wizard box will be open.
Ø Now select Record operation option OR Record
navigation in categories field.
Ø Then select any one by one action like add, delete, save,
print, find etc.
Ø Click on next button
Ø Now click on text option.
Ø Then click on finish button
Ø Finally button will be created.
v For
Insert Picture on the form:-
Ø First of open
the form design window.
Ø Now click on design window.
Ø Now click on design tab.
Ø ]Control group
Ø Now click on image tool. And drag and drop the mouse
pointer in detail section of the form.
Ø Then a box will be open
Ø Now select any one picture
Ø Click on insert button
Ø Finally picture will we inserted on the form.
v Report:- Report is an object of the database you can create
report based on table query and from. In Ms-Access you can create report
through various commands like.
Ø Report
Ø Report wizard
Ø Report design
Ø To create
a report based on table:-
Ø First of all select the table name of which you want
to create report
Ø Select create table
Ø Click on report button under the report group.
Ø Fi9nally a report that selected table will be created
into the data base.
Ø When you will create using the report command it will
display the report in layout view.
Ø In this view you can change the format & layout of
the report also change the contents of Header section also format it as you
like.
Ø Click on save button.
Ø Enter a name
Ø Click on ok
Ø And the Switch the report to its find or print view
selects “Report View” under the view & group of Home tab.
Ø To create
a Report based on form:-
Ø First of all select the form name of which you want to
create Report.
Ø Select create tab.
Ø Click on report button under the Report group.
Ø Finally a Report of that selected form will be created
into the database.
Ø When you will create Report using the Report command
it will display the Report in Layout view.
Ø In this view you can change the format & layout of
the Report & also change the contents of Header section also format it was
you like.
Ø Click on save button.
Ø Enter a name.
Ø Click on ok. And then switch the report to its find or
print views select “Report view” under view & group of Home tab.
Ø To Create
a Report:-
Ø Select the Table/Query name of which you want to
create Report.
Ø Select Create tab.
Ø Click on Report view wizard button under the Report
group.
Ø A report wizard dialog box will be open.
Ø All fields of that selected Table/query will be
displays into the Available field’s list box.
Ø Select the fields one by one & click on (>) Add
button to add the field into the selected field’s list box only those fields
you want to display into the Report.
Ø Click on next.
Ø Specify any one field as a group heading.
Ø Click on next.
Ø Specify the layout & the orientation of the Report
as per you need.
Ø Click on next button
Ø Click on finish.
Ø Finally a Report of that selected table/ query will be
created using the wizard.
Note: - if you want to change or modify anything into the
report or if you want to create a Report as per your need the use Report Design
or Design view.
For
Create Report Using design view:-
Ø Create tab.
Ø Now go to report group.
Ø Then click on report design button.
Ø Now report design windows will be open.
Ø Then go to tools group.
Ø And the click ob add existing field button.
Ø Now a field list task pane will be open in right side
of the window. With all created table name.
Ø Now drag the table field one by one and drop on report
design window.
Ø After add all fields then arrange and format the
inserted field.
Ø Now click right mouse\ button in report header/footer
potion.
Ø Then a header and footer field will be added in design
window.,
Ø Now click on label Aa button in control group.
Ø Now drag and drop the mouse pointer in header field
and then type the header matter and format it
Ø Same process done for specify footer matter.
Ø Now save the Report with given name.
v For print
a Report:-
Ø First of all select & open the Report which you
want to print.
Ø Go to Home tab.
Ø Click on view button under the views group.
Ø A drop down list will be appears.
Ø Select “print preview” option.
Ø The print preview of the selected report will be open.
Ø Click on print button under the print preview tab.
Ø A print dialog box will be open.
Ø Select All /Current page/page any one of them.
Ø And then specify no. of copy you want to print in it.
Ø Clock on print button.
Ø Finally Report will gets printed.
v Macros:- Macro is used to run the components like
table, ‘Query, form, report etc. individually or all by specified condition.
Ø For
Create Macro:-
Ø Click on create tab.
Ø Then click on Macro drop down arrow button under the
other group.
Ø Now click on Macro button.
Ø Macro design window will be open. Now specify the
action like open table in action field.
Ø Then select the appropriate instruction according to
action like select table into table name field.
Ø Using above process you specify action and appropriate
instruction
Ø Now click on save tool.
Ø Then type the macro name
Ø Now click on ok button
Ø Finally macro will be created.
Open
table
|
Book Table
|
Open table
|
Member Table
|
Open table
|
Issue Table
|
Open Form
|
Book Table Form
|
v For Run
Macro :-
Ø First of click on tables drop down arrow
Ø Now a list will be shown
Ø Then click on Macro option
Ø Now all created macro will be shown
Ø Then right click on any one macro
Ø Now a list will be shown
Ø Then click on run option
Ø Finally all table record will be displayed at once.
v Set
Database Password:-
Ø First of close the opened database
Ø Now click office button
Ø Then click on open button
Ø Now a box will be open
Ø Then select the database name
Ø Then click on open button drop down arrow
Ø Now a list will by show
Ø Then click on open exclusive option
Ø Finally database will be open in exclusive mode.
Ø Now click on database tools tab.
Ø Then go to database tools group and click on encrypt
with password or set data base password button.
Ø Now a set database password box will be open.
Ø Then type the password in verify field
Ø Then click on ok button
Ø Finally database password will be set.
Ø Now close and reopen the data base.
v For Unset
database password:-
Ø Now click on office button.
Ø Then click on open option.
Ø Now a box will be open.
Ø Then select the database name.
Ø Then select the database name.
Ø Then click on open exclusive option.
Ø Finally database will be open in exclusive mode.
Ø Now click on database tools tab.
Ø Then go to database tools group and click on decrypt
with password or unset data base password button.
Ø Now a unset database password box will be open.
Ø Now type the right password and click on ok & save
button.
Sign up here with your email
