0% found this document useful (0 votes)
13 views

unit 2

The document provides an overview of Microsoft Access as a Database Management System (DBMS) used in business accounting, detailing its object classes including tables, queries, forms, reports, pages, macros, and modules. It outlines the capabilities of Access, such as data organization, integrity enforcement, and multi-user transaction processing, as well as step-by-step instructions for creating databases and queries. Additionally, it explains various types of queries, including select, action, and parameter queries, with examples of how to implement them.

Uploaded by

b1611774
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)
13 views

unit 2

The document provides an overview of Microsoft Access as a Database Management System (DBMS) used in business accounting, detailing its object classes including tables, queries, forms, reports, pages, macros, and modules. It outlines the capabilities of Access, such as data organization, integrity enforcement, and multi-user transaction processing, as well as step-by-step instructions for creating databases and queries. Additionally, it explains various types of queries, including select, action, and parameter queries, with examples of how to implement them.

Uploaded by

b1611774
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/ 70

DBMS (MS ACCESS) IN BUSINESS ACCOUNTING

It is one of the popularly used Database Management System (DBMS) to create,


store and manage database. It is also popularly called ACCESS. Every component
that is created using Access is an object and several such similar objects constitute
a class. Access is functionally available with the following seven-object classes.
Each of these object classes is capable of creating their respective object replicas.

• Tables: This object class allows a database designer to create the data tables with
their respective fieldnames, data types and properties.

• Queries: This object class is meant to create the SQL compatible query statement
with or without the help of Graphic User Interface (GUI) to define tables, store data
and retrieve both data and information.

 Forms: This object class allows the designer to create an appropriate user
interface to formally interact with the back end database, defined by the tables
and queries.

• Reports: This object class is used to create various reports, the source of
information content of which is based on tables, queries or both. Such reports are
designed in Access according to the requirement of end-user.

• Pages: This object class is meant to create Data Access Pages, which can be
posted on a Web site of an organisation using Internet or sent via e-mail to someone
of the organisation’s network.

• Macros: In macro programming, the objects using individual instructions called


macro-oriented actions are manipulated. A Macro is a list of macro oriented actions
that run as a unit. Access provides for such Macro programming.

• Modules: These are the foundations of any application and allow the designer to
create a set of programming instructions, called functions or sub-routines that can be
used throughout the application
Capabilities of MS Access

Access has certain capabilities, which bring it closer to an ideal Database


Management System. These capabilities are:

• Storing the data in an organised manner.

• Enforcing data integrity constraints.

• Representing complex relationship among data.

• Providing for persistent storage of database objects.

• Restricting unauthorised access to database.

• Allowing fast retrieval of data with or without processing by using SQL.

• Flexibility to create multiple user interfaces.

• Providing for data sharing and multi-user transaction processing.

• Supporting multiple views of data and information.

Access Basics for Creating a Database

When a new database is created from the scratch, there is complete control over the
database objects, their properties and the relationships. In order to create a new
database without the help of database wizard (that is an automated process in
Access), the following steps are required:

(i) Open Access Window to choose blank Access database and click OK
button.
(ii) Access responds by displaying File New Database dialog box, which
prompts the designer to enter a file name and a location for the database.
This must be followed by clicking Create button.
(iii) If the task pane is not open, choose File from menu bar and click at new
to open the task pane to create a new database.

Create a New Blank Table

1. Click the Create tab.


2. Click Table.

A new table appears in Datasheet View. You can start entering data right away, but
you should add some fields first.

3. Click the Click to Add field heading.


4. A list of data types appears. See the table at the end of this lesson to learn
more about your options.

Select the field type.

5. When selecting a field type, select the smallest or shortest field that is
required for your data. For example, don’t choose Large Number if you only
need to store a 2-digit number.
Type a name for the field.

To change the name of a field header, double-click the field header and type the field
name you want to use.

6. Repeat Steps 3-5 to add the remaining fields to your table.


7. When you’re finished adding fields, click the Close button and click Yes to
save your changes
8. Enter a name for your new table.
9. Click OK.

Create a Table in Design View


Design View allows you to create a table with more ease.

1. Click the Create tab.


2. Click Table Design.
3. A new table appears in the window in Design View.
4. Enter a field name in the Field Name column and press Enter.
5. Click the Data Type list arrow and select a data type for the field.

See the table at the end of this lesson for more information about data types.

6. Repeat steps 3-4 to add as many fields as you want.


7. When you’re finished, click the Close button. Save and name your table.
That’s all there is to creating a table!

Data Type Example Description

Stores text, numbers, or a


Short Text First Name: John
combination of both; up to 255
characters long. Text fields are
the most common of all data
types.

Stores numbers that can be


Number Age: 31
used in calculations.

Stores huge numbers (2^63),


Cells in Human
Large Number usually only used for scientific
Body: 30,000,000,000,000
purposes.

Stores numbers and symbols


Currency Price: $84.95
that represent money.

Date & Time Birthday: April 7, 1969 Stores dates, times, or both.

Stores only one of two values,


Yes/No Employed? Yes such as Yes or No; True or
False; etc.

A wizard that helps you create


a field whose values are
Lookup &
selected from a table, query, or
Relationship Purpose of Trip:
a present
list of values.

Stores long text entries that can


Rich Text Instructions: include font and paragraph
formatting.

Stores long text entries such as


Notes: Sally displays a high
Long Text notes or anything else that
amount of…
requires a lot of space.

Stores attachments such as a


Attachment
Photo: Word document or photo.
Stores clickable links to files on
Hyperlink Website: www.customguide.com your computer, on the network,
or to web pages on the internet.

Query

A query is a request for data results, and for action on data. You can use a query to
answer a simple question, to perform calculations, to combine data from different
tables, or even to add, change, or delete table data.
 As tables grow in size they can have hundreds of thousands of records, which
makes it impossible for the user to pick out specific records from that table.
 With a query you can apply a filter to the table's data, so that you only get the
information that you want.
 Queries that you use to retrieve data from a table or to make calculations are
called select queries.
 Queries that add, change, or delete data are called action queries.
 You can also use a query to supply data for a form or report.
 In a well-designed database, the data that you want to present by using a form
or report is often located in several different tables.
 The tricky part of queries is that you must understand how to construct one
before you can actually use them.
Create Select Query
If you want to review data from only certain fields in a table, or review data from
multiple tables simultaneously or maybe just see the databased on certain criteria,
you can use the Select query. Let us now look into a simple example in which we
will create a simple query which will retrieve information from tblEmployees table.
Open the database and click on the Create tab.

Click Query Design.


In the Tables tab, on the Show Table dialog, double-click the tblEmployees table
and then Close the dialog box.

In the tblEmployees table, double-click all those fields which you want to see as
result of the query. Add these fields to the query design grid as shown in the
following screenshot.

Now click Run on the Design tab, then click Run.


The query runs, and displays only data in those field which is specified in the query.
Query Criteria

Query criteria helps you to retrieve specific items from an Access database. If an
item matches with all the criteria you enter, it appears in the query results. When you
want to limit the results of a query based on the values in a field, you use query
criteria.
A query criterion is an expression that Access compares to query field values
to determine whether to include the record that contains each value.
 Some criteria are simple, and use basic operators and constants. Others are
complex, and use functions, special operators, and include field references.
 To add some criteria to a query, you must open the query in the Design View.
 You then identify the fields for which you want to specify criteria.
Example
Let’s look at a simple example in which we will use criteria in a query. First open your
Access database and then go to the Create tab and click on Query Design.

In the Tables tab on Show Table dialog, double-click on the tblEmployees table and
then close the dialog box.
Let us now add some field to the query grid such as EmployeeID, FirstName,
LastName, JobTitle and Email as shown in the following screenshot.

Let us now run your query and you will see only these fields as query result.

If you want to see only those whose JobTitle are Marketing Coordinator then you will
need to add the criteria for that. Let’s go to the Query Design again and in Criteria
row of JobTitle enter Marketing Coordinator.
Let us now run your query again and you will see that only Job title of Marketing
Coordinators are retrieved.

If you want to add criteria for multiple fields, just add the criteria in multiple fields. Let
us say we want to retrieve data only for “Marketing Coordinator” and “Accounting
Assistant”; we can specify the OR row operator as shown in the following screenshot

Let us now run your query again and you will see the following results.
If you need to use the functionality of the AND operator, then you have to specify the
other condition in the Criteria row. Let us say we want to retrieve all Accounting
Assistants but only those Marketing Coordinator titles with “Pollard” as last name.

Let us now run your query again and you will see the following results.

Action Queries
In MS Access and other DBMS systems, queries can do a lot more than just
displaying data, but they can actually perform various actions on the data in your
database.
 Action queries are queries that can add, change, or delete multiple records at
one time.
 The added benefit is that you can preview the query results in Access before
you run it.
 Microsoft Access provides 4 different types of Action Queries −
o Append
o Update
o Delete
o Make-table
 An action query cannot be undone. You should consider making a backup of
any tables that you will update by using an update query.
Create an Append Query
You can use an Append Query to retrieve data from one or more tables and add that
data to another table. Let us create a new table in which we will add data from
the tblEmployees table. This will be temporary table for demo purpose.
Let us call it TempEmployees and this contains the fields as shown in the following
screenshot.

In the Tables tab, on the Show Table dialog box, double-click on


the tblEmployees table and then close the dialog box. Double-click on the field you
want to be displayed.
Let us run your query to display the data first.

Now let us go back to Query design and select the Append button.
In the Query Type, select the Append option button. This will display the following
dialog box.

Select the table name from the drop-down list and click Ok.

In the Query grid, you can see that in the Append To row all the field are selected by
default except Address1. This because that Address1 field is not available in
the TempEmployee table. So, we need to select the field from the drop-down list.
Let us look into the Address field.

Let us now run your query and you will see the following confirmation message.

Click Yes to confirm your action.

When you open the TempEmployee table, you will see all the data is added from
the tblEmployees to the TempEmployee table.
Create Queries
Create an Update Query
You can use an Update Query to change the data in your tables, and you can use an
update query to enter criteria to specify which rows should be updated. An update
query provides you an opportunity to review the updated data before you perform the
update. Let us go to the Create tab again and click Query Design.

In the Tables tab, on the Show Table dialog box, double-click on


the tblEmployees table and then close the dialog box.

On the Design tab, in the Query Type group, click Update and double-click on the
field in which you want to update the value. Let us say we want to update the
FirstName of “Rex” to “Max”.
In the Update row of the Design grid, enter the updated value and in Criteria row
add the original value which you want to be updated and run the query. This will
display the confirmation message.

Click Yes and go to Datasheet View and you will see the first record — FirstName is
updated to “Max” now.

Create a Delete Query


You can use a delete query to delete data from your tables, and you can use a
delete query to enter criteria to specify which rows should be deleted. A Delete
Query provides you an opportunity to review the rows that will be deleted before you
perform the deletion. Let us go to the Create tab again and click Query Design.

In the Tables tab on the Show Table dialog box, double-click


the tblEmployees table and then close the dialog box.

On the Design tab, in the Query Type group, click Delete and double-click on
the EmployeeID.
In the Criteria row of the Design Grid, type 11. Here we want to delete an employee
whose EmployeeID is 11.

Let us now run the query. This query will display the confirmation message.
Click Yes and go to your Datasheet View and you will see that the specified
employee record is deleted now.

Create a Make Table Query


You can use a make-table query to create a new table from data that is stored in
other tables. Let us go to the Create tab again and click Query Design.

In the Tables tab, on the Show Table dialog box, double-click


the tblEmployees table and then close the dialog box.
Select all those fields which you want to copy to another table.

In the Query Type, select the Make Table option button.


You will see the following dialog box. Enter the name of the new table you want to
create and click OK.

Now run your query.

You will now see the following message.

Click Yes and you will see a new table created in the navigation pane.
Parameter Queries
The best part about queries is that you can save and run the same query again and
again, but when you run the same query again and again by only changing the
criteria then you might consider the query to accept parameters.
 If you frequently want to run variations of a particular query, consider using a
parameter query
 Parameter query retrieves information in an interactive manner prompting the
end user to supply criteria before the query is run.
 You can also specify what type of data a parameter should accept.
 You can set the data type for any parameter, but it is especially important to
set the data type for numeric, currency, or date/time data.
 When you specify the data type that a parameter should accept, users see a
more helpful error message if they enter the wrong type of data, such as
entering text when currency is expected.
 If a parameter is set to accept text data, any input is interpreted as text, and
no error message is displayed.
Example
Let us now take a look at a simple example by creating a parameter query. Let us
open your database and select Query Design in the Create table tab.
Double-click on the tblProjects and close the Show dialog box.

Select the field you want to see as a query result as shown in the following
screenshot.

In the query design grid, in the Criteria row of the ProjectStart column, type [Enter a
project start data]. The string [Enter a project start data] is your parameter
prompt. The square brackets indicate that you want the query to ask for input, and
the text is Enter a project start data is the parameter prompt displays.
Let us now run your query and you will see the following prompt.

Let us now enter the following date.

Click OK to confirm.

As a result, you will see the details of the project which started on 2/1/2007. Let us
go to the Design View and run the query again.
Enter the date as in the above screenshot and click Ok. You will now see the details
of the project which started on 5/1/2008.
The best part about queries is that you can save and run the same query again and
again, but when you run the same query again and again by only changing the
criteria then you might consider the query to accept parameters.
 If you frequently want to run variations of a particular query, consider using a
parameter query
 Parameter query retrieves information in an interactive manner prompting the
end user to supply criteria before the query is run.
 You can also specify what type of data a parameter should accept.
 You can set the data type for any parameter, but it is especially important to
set the data type for numeric, currency, or date/time data.
 When you specify the data type that a parameter should accept, users see a
more helpful error message if they enter the wrong type of data, such as
entering text when currency is expected.
 If a parameter is set to accept text data, any input is interpreted as text, and
no error message is displayed.
Example
Let us now take a look at a simple example by creating a parameter query. Let us
open your database and select Query Design in the Create table tab.

Double-click on the tblProjects and close the Show dialog box.


Select the field you want to see as a query result as shown in the following
screenshot.

In the query design grid, in the Criteria row of the ProjectStart column, type [Enter a
project start data]. The string [Enter a project start data] is your parameter
prompt. The square brackets indicate that you want the query to ask for input, and
the text is Enter a project start data is the parameter prompt displays.
Let us now run your query and you will see the following prompt.

Let us now enter the following date.

Click OK to confirm.

As a result, you will see the details of the project which started on 2/1/2007. Let us
go to the Design View and run the query again.

Enter the date as in the above screenshot and click Ok. You will now see the details
of the project which started on 5/1/2008.

Create Relationships
To create relationships between related tables. One of the goals of good database
design is to remove data redundancy.
 To achieve that goal, you divide your data into many subject-based tables so
that each fact is represented only once.
 To do this, all the common fields which are related to each other are placed in
one table.
 To do this step correctly, you must first understand the relationship between
your tables, and then specify these relationships in your Access database.
Why Create Table Relationships?
MS Access uses table relationships to join tables when you need to use them in a
database object. There are several reasons why you should create table
relationships before you create other database objects, such as forms, queries,
macros, and reports.
 To work with records from more than one table, you often must create a query
that joins the tables.
 The query works by matching the values in the primary key field of the first
table with a foreign key field in the second table.
 When you design a form or report, MS Access uses the information it gathers
from the table relationships you have already defined to present you with
informed choices and to prepopulate property settings with appropriate default
values.
 When you design a database, you divide your information into tables, each of
which has a primary key and then add foreign keys to related tables that
reference those primary keys.
 These foreign key-primary key pairings form the basis for table relationships
and multi-table queries.
Let us now add another table into your database and name it tblHRData using Table
Design as shown in the following screenshot.

Click on the Save icon as in the above screenshot.

Enter tblHRData as table name and click Ok.


tblHRData is now created with data in it.

One-To-One Relationship
Let us now understand One-to-One Relationship in MS Access. This relationship is
used to relate one record from one table to one and only one record in another table.
Let us now go to the Database Tools tab.

Click on the Relationships option.


Select tblEmployees and tblHRData and then click on the Add button to add them
to our view and then close the Show Table dialog box.

To create a relationship between these two tables, use the mouse, and click and
hold the EmployeeID field from tblEmployees and drag and drop that field on the
field we want to relate by hovering the mouse right
over EmployeeID from tblHRData. When you release your mouse button, Access
will then open the following window −
The above window relates EmployeeID of tblEmployees to EmployeeID of
tblHRData. Let us now click on the Create button and now these two tables are
related.

The relationship is now saved automatically and there's no real need to click on the
Save button. Now that we have the most basic of relationships created, let us now
go to the table side to see what has happened with this relationship.

Let us open the tblEmployees table.

Here, on the left-hand side of each and every record, you will see a little plus sign by
default. When you create a relationship, Access will automatically add a sub-
datasheet to that table.
Let us click on the plus sign and you will see the information that is related to this
record is on the tblHRData table.

Click on the Save icon and open tblHRData and you will see that the data we have
entered is already here.
One-To-Many Relationship
The vast majority of your relationships will more than likely be this one to many
relationships where one record from a table has the potential to be related to many
records in another table.
The process to create one-to-many relationship is exactly the same as for creating a
one-to-one relationship.

Let us first clear the layout by clicking on the Clear Layout option on the Design
tab.

We will first add another table tblTasks as shown in the following screenshot.
Click on the Save icon and enter tblTasks as the table name and go to
the Relationship view.

Click on the Show Table option.

Add tblProjects and tblTasks and close the Show Table dialog box.
We can run through the same process once again to relate these tables. Click and
hold ProjectID from tblProjects and drag that all the way over to the ProjectID from
tblTasks. Further, a relationships window pops up when you release the mouse.

Click the Create button. We now have a very simple relationship created.

Many-To-Many Relationship
et us understand Many-to-Many Relationship. To represent a many-tomany
relationship, you must create a third table, often called a junction table, that breaks
down the many-to-many relationship into two one-to-many relationships. To do so,
we also need to add a junction table. Let us first add another table tblAuthers.
Let us now create a many-to-many relationship. We have more than one author
working on more than one project and vice versa. As you know, we have an Author
field in tblProjects so, we have created a table for it. We do not need this field any
more.

Select the Author field and press the delete button and you will see the following
message.

Click Yes. We will now have to create a junction table. This junction table have two
foreign keys in it as shown in the following screenshot.

These foreign key fields will be the primary keys from the two tables that were linked
together — tblAuthers and tblProjects.
To create a composite key in Access, select both these fields and from the table
tools design tab, you can click directly on that primary key and that will mark not
one but both of these fields.

The combination of these two fields is the tables’ unique identifier. Let us now
save this table as tblAuthorJunction.
The last step in bringing the many-to-many relationships together is to go back to
that relationships view and create those relationships by clicking on Show Table.
Select the above three highlighted tables and click on the Add button and then close
this dialog box.

Click and drag the AuthorID field from tblAuthors and place it on top of
the tblAuthorJunction table AuthorID.
The relationship you’re creating is the one that Access will consider as a one-to-
many relationship. We will also enforce referential integrity. Let us now turn
on Cascade Update and click on the Create button as in the above screenshot.

Let us now hold the ProjectID, drag and drop it right on top
of ProjectID from tblAuthorJunction.
We will Enforce Referential Integrity and Cascade Update Related Fields.

The following are the many-to-many relationships.

Wildcards
Wildcards are special characters that can stand in for unknown characters in a text
value and are handy for locating multiple items with similar, but not identical data.
Wildcards can also help with getting databased on a specified pattern match.
Access supports two sets of wildcard characters because it supports two standards
for Structured Query Language.

 ANSI-89
 ANSI-92
As a rule, you use the ANSI-89 wildcards when you run queries and find-and-
replace operations against Access databases such as *.mdb and *.accdb files.
You use the ANSI-92 wildcards when you run queries against Access projects —
Access files connected to Microsoft SQL Server databases. Access projects use the
ANSI-92 standard because SQL Server uses that standard.
ANSI-89 Wildcard Characters
The following table lists out characters supported by ANSI-89 −

Character Description Example

* Matches any number of characters. You can wh* finds what, white, and
use the asterisk (*) anywhere in a character why, but not awhile or
string. watch.

? Matches any single alphabetic character. B?ll finds ball, bell, and
bill.

[] Matches any single character within the B[ae]ll finds ball and bell,
brackets. but not bill.

! Matches any character not in the brackets. b[!ae]ll finds bill and bull,
but not ball or bell.

- Matches any one of a range of characters. b[a-c]d finds bad, bbd, and
You must specify the range in ascending bcd.
order (A to Z, not Z to A).

# Matches any single numeric character. 1#3S finds 103, 113, and
123.

ANSI-92 wildcard characters


The following table lists out characters supported by ANSI-92 −

Character Description Example

% Matches any number of characters. It can be wh% finds what, white, and
used as the first or last character in the why, but not awhile or
character string. watch.
_ Matches any single alphabetic character. B_ll finds ball, bell, and bill.

[] Matches any single character within the B[ae]ll finds ball and bell,
brackets. but not bill.

^ Matches any character not in the brackets. b[^ae]ll finds bill and bull,
but not ball or bell.

- Matches any one of a range of characters. b[a-c]d finds bad, bbd, and
You must specify the range in ascending bcd.
order (A to Z, not Z to A).

Example
Let us now look at a simple example of using these wildcard characters by opening
the query design.
Add the highlighted tables and close the Show Table dialog box.

Add the fields in the query grid which you want to see as a query result.
Run your query.

Let us again go to the query design and add prompt for project name.

Now run your query and let us assume that you don’t know the exact project name,
but you know that the project name contains the words “potion”. Click Ok.
The above step does not generate any result. That is because Access is looking for
an exact match in the project name field. It is looking for that project which has the
word potion in its name.
If you want it so that the users can enter wildcards to replace unknown characters,
then you need to adjust the criteria and include the operator like.

When you run the query, users can use wildcards to replace any number of
characters.

Let us assume that you know that the word potion appears somewhere in the title
but you are not exactly sure where.
You can add an * to replace any number of characters before the word potion and
then add another * after the. Click Ok.
It is always good for the users to know the wildcards they can enter. But there are
users who may not know the wildcards they can and cannot enter. In that case, you
can enter the wildcards yourself.
In this situation, in-between the Like operator and our parameter prompt, we can
add those wildcards and now there's a very specific way we have to write this. After
the word like in quotation marks, enter the wildcard that we are using. In this case,
we have used “*” to replace any number of characters. We will now add this to the
parameter. To do so, we need ampersand (&) symbol and a space. We will now
repeat this step and add another ampersand (&) because we're joining that wildcard
to whatever criteria is entered in for that project name by the user and then “*” in
quotes.
Let us now run our query again. Enter the word potion in the prompt without any
wildcards.

The query will now track those wildcards on either side of whatever is entered here.
We need to simply type potion and press enter.

We now get the results we were looking for and the results will be the same
regardless of what the users enter.
Let us say we want to find every project with the word “the” in the title. Then, you
need to just type the word and Enter or click Ok.
With this query, it becomes easier to search for projects with the word “the” in their
names. The 2nd level of results may also include the project names with the word
“mother” where “the” is part of the word.

Joins
A database is a collection of tables of data that allow logical relationships to each
other. You use relationships to connect tables by fields that they have in common. A
table can be part of any number of relationships, but each relationship always has
exactly two tables. In a query, a relationship is represented by a Join.
What is Join
A join specifies how to combine records from two or more tables in a database.
Conceptually, a join is very similar to a table relationship. In fact, joins are to queries
what relationships are to tables.
The following are the two basic types of joins that we will be discussing in this
chapter −

 The inner join


 The outer join
Both of which can easily be created from a queries design view.
Inner Join
Let us now understand Inner Join −

 The most common type of join is an inner join which is also the default join
type in Microsoft Access.
 Inner Join will display only the rows or records where the joined fields from
both tables are equal.
 This join type looks at those common fields and the data contained within. It
only displays the matches.
Outer Join
Let us now understand what an Outer Join is −

 An outer join displays all rows from one table and only those rows or records
from the other table where the joined fields are equal.
 In other words, an outer join shows all rows from one table and only the
corresponding rows from the other table.

There are other Join types too −


Left Outer Join & Right Outer Join
Let us now understand Left Outer Join and Right Outer Join −

 You can choose the table that will display all rows.
 You can create a Left Outer Join which will include all the rows from the first
table.

 You can create a Right Outer Join that will include all the rows from the
second table.
Let us now go to the Create tab and create a query from the Design View.
Select tblProjects and tblTasks and close the Show Table dialog box as in the
following screenshot.

Add the ProjectName field from tblProjects, and TaskTitle,


StartDate and DueDate from tblTasks table.

Let us now run the query.


We are only displaying records from a few projects. A couple of these projects have
a lot of tasks associated with that project and this information is related
through ProjectID field.
 When we create this query in Microsoft Access, Access is taking this
relationship from the relationships we have created.
 By default, it is creating what's known as an Inner Join between these two
fields, between these two tables, and that is how it is relating this information
together from these two tables.
 It is showing us only the matches, so when we run this query, there are a lot of
other projects listed in tblProjects that do not appear as part of our records
set in this query, and that is because of how these two tables are joined
together, through that Inner Join, which is again, that default Join for any
query.
However, if you want to alter the relationship, Let us say you want to create an outer
join, or in other words, show all of the projects from tblProjects, every single record
that is in that table, along with all of the tasks from tblTasks — Open join properties;
we can do this simply by double-clicking on the relationship line.

Access will display the left table name and the right table name in Join Properties
dialog.
 The left column name and the right column name and the first radio button is
to only include rows where the join fields from both tables are equal and that is
the inner join and that is what is selected by default when creating
relationships, when creating a join in the query, but, you can change it.
 We have two other options as well; we can include all records
from tblProjects, and only those records from tblTasks where the joined
fields are equal and this one is Left Outer Join.
 We have a third option, include all records from tblTasks and only those
records from tblProjects where the joined fields are equal and this one is Right
Outer Join.
Those are the different types of joins you can create easily from the Design View. Let
us select the second option, which is Left Outer Join, and click Ok.
Let us now look into the other steps –

When you look at the relationship line, you will see a little arrow pointing
towards ProjectID in tblTasks. When you run this query, you will see the following
results.

As you can see that it is showing us every single project name, whether or not it has
a related task. You will also see a bunch of null fields. All of this will be blank
because there is no related information in tblTasks, where these fields come from.
Let us now go to the Design View again and double-click on the relationship line.
In the Join Properties dialog box, select the third option which is for the Right Outer
Join and click Ok.

Now look at our relationship line. You will see that a little arrow is now pointing
towards ProjectID in tblProjects. When you run this query you will see the following
results.

Self-Joins
Self-join is another type of Join. A Self-join relates matching fields from within the
same table. For example, look at the employee's table with a supervisor field, which
references the same kind of number stored in another field within the same table —
the employee ID.
If we wanted to know who Kaitlin Rasmussen's supervisor is, we will have to take the
number stored in that supervisor field and look it up within the exact same table in
that employee ID field in order to know that Charity Hendricks is the supervisor.
This table is not the ideal structure for a relational database because it's not
normalized.
If we have a situation where we want to create a query that just lists the employee
names alongside the names of their supervisors, there is no easy way we can query
that unless we create a Self-join.
To see a Self-join, create a table with the following fields and enter some data.

Here we want to create a list again with the first name of the employee and then the
name of the supervisor. Let us create a query from the query design view.
Now, add tblEmployees tables.
Close this dialog box.
Now, add the first name and last name for our employees.

We now need a way to create a relationship between this table and itself. To do that,
we need to open the show table dialog box and add tblEmployees one more time.
We have created another copy of the same table in this query view. Now, we need to
create Self-join. To do that, click on Supervisor in tblEmployees table and hold the
mouse button and drop it right on top of the EmployeeID in that copied table
— tblEmployees_1. Then, add the first name and last name from that copied table.

Let us now run your query and you will see the following results.

It displays the names of the employees along side the names of their supervisors.
And, this is how you create a Self-join in Microsoft Access.

Create a form from an existing table or query in


Access
To create a form from a table or query in your database, in the Navigation
Pane, click the table or query that contains the data for your form, and on
the Create tab, click Form.
Access creates a form and displays it in Layout view. You can make design
changes like adjusting the size of the text boxes to fit the data, if
necessary. For more information, see the article on using the form tool.

Create a blank form in Access


1. To create a form with no controls or preformatted elements: On
the Create tab, click Blank Form. Access opens a blank form in
Layout view, and displays the Field List pane.
2. In the Field List pane, click the plus sign (+) next to the table or
tables that contain the fields that you want to see on the form.
3. To add a field to the form, double-click it or drag it onto the form. To
add several fields at once, hold down CTRL and click several fields,
and then drag them onto the form at the same time.
4. Use the tools in the Controls group on the Form Layout Tools tab
to add a logo, title, page numbers, or the date and time to the form.
5. If you want to add a wider variety of controls to the form,
click Design and use the tools in the Controls group.

Create a split form in Access


A split form gives you two views of the data at the same time — a Form
view and a Datasheet view. Working with split forms gives you the
benefits of both types of forms in a single form. For example, you can use
the datasheet portion of the form to quickly locate a record, and then use
the form portion to view or edit the record. The two views are connected
to the same data source and are synchronized with each other at all
times.

To create a new split form by using the Split Form tool, in the Navigation
Pane, click the table or query that contains the data, and then on
the Create tab, click More Forms, and then click Split Form.
Access creates the form and you can make design changes to the form.
For example, you can adjust the size of the text boxes to fit the data, if
necessary. For more information on working with a split form, see the
article on creating a split form.

Create a form that displays multiple records in Access

A multiple item form, also known as a continuous form, and is useful if you
want a form that displays multiple records but is more customizable than
a datasheet, you can use the Multiple Items tool.

1. In the Navigation Pane, click the table or query that contains the data
you want to see on your form.
2. On the Create tab and click More Forms > Multiple Items.

Access creates the form and displays it in Layout view. In Layout view,
you can make design changes to the form while it is displaying data. For
example, you can adjust the size of the text boxes to fit the data. For
more details, see Create a form by using the Multiple Items tool.

Create a form that contains a sub form in Access


When you are working with related data that is stored in separate tables,
you often need to view data from multiple tables or queries on the same
form and subforms are a convenient way to do this. Since there are
several ways of adding a subform depending on your needs, for more
information, see the article Create a form that contains a subform (a one-
to-many form).

Create a Navigation form in Access


A navigation form is simply a form that contains a Navigation Control.
Navigation forms are a great addition to any database, but creating a
navigation form is particularly important if you plan to publish a database
to the Web, because the Access Navigation Pane does not display in a
browser.

1. Open the database to which you want to add a navigation form.


2. On the Create tab, in the Forms group, click Navigation, and then
select the style of navigation form that you want.

Access creates the form, adds the Navigation Control to it, and displays
the form in Layout view. For more information, see Create a navigation
form.
Financial Accounting Reports can be generated in MS access
easily. Ledger is one of the financial reports through which
accounting transactions are shown in a particular account, during
a given period of time.
A ledger contains eight columns as follows

Dr Ledger Account Cr

Date Particular JF Amt.(Rs.) Date Particula JF Amt.


rs (Rs.)

For creating a ledger in MS Access it is necessary to retrieve a set


of processed data records each of which provide information Code
(Account Number), Name of Account, Particulars, Date Debit
Balance and Credit for Creating Balance with reference to each
particular account.
For creating Ledger in MS Access we have to take the following
steps.

1. Select 'Reports' from the 'Object' list in the Database window.

2. Click 'New' button so that 'New Report' window is displayed.

3. Select 'Design View' and 'Query L' from the combo control.

4. Click 'OK'.

With this, the access responds by displaying a blank report


design divided horizontally into three sections- Page Header,
Detail and Page footer. Also, a list of available fields of Query L is
provided for embedding on to this blank design.
5. Click at 'Properties' of the report and select 'Data' tab to define
the recorded source as Query L. This displays a list of available
fields of Query L.

6. Right click at any part of the report design and choose Report,
Page Header and Footer. With this, the Access responds by
providing two more sections- Page Header and Pager Footer.

7. Click at the 'icon' of the toolbar and pick up a label control to


be placed at the Page Header section and assign its caption.

8. Select all the fields of Query L by clicking at every field, while


keeping the 'Ctrl key' pressed. Drag and drop the selected field
on the 'Details Section'.

9. Select the total control of all the six fields by clicking at each,
while keeping the 'Shift key' pressed. Right click at the 'Select
Label Control' and choose 'Cut'. Now, place the mouse at the Page
Header Section and 'Paste' these controls.

10. Choose the 'Properties' provided by the Access.

11. Align the text controls in the 'Details Section'.

12. Select the 'Text Controls' and 'Amount Field' and modify their
properties.

Hence, the required ledger in access is created.

What Is Payroll Accounting


All employees of an organization receive payments through the payroll department.
The process of documenting records for employee compensation is known as payroll
accounting. Payroll accountants have an influential role in making sure records are
filed correctly, so employees can receive proper earnings for completed work and
that financial operations are being carried out smoothly.

In this article, we will outline what payroll accounting is, what's included in payroll
accounting, examples of this concept and how to start payroll accounting.

What is payroll accounting?

Payroll accounting consists of filing and tracking employee compensation data like
money withheld from each pay check and taxes and benefits the employee receives.
Payroll accountants use financial journal entries to summarize an organization's
transactions and total cash flow. Payroll entries fall under the scope of a general
ledger that sorts all financial information. Once all payroll information is documented
on an employee, human resources can pull this data and send it to their manager to
add it to their performance evaluation.

What is included in payroll accounting?

Payroll accountants need to employ their hard skills to accurately insert relevant
information into the ledger. All expenses, liabilities and assets must be recorded for
financial and compliance purposes. Here is a full list of what you should add when
documenting employee compensation:

 Gross wages, salaries, bonuses and commissions


 Withholding employer and employee taxes
 Withholding of salary, insurance premiums and savings plans
 Employer fringe benefits' expenses

Gross wages, salaries, bonuses and commissions

You should account for all earnings that an employee made during the fiscal year.
This includes the annual salary, additional wages and overtime pay if applicable. If
your employer offers overtime pay, check with your manager and human resources
to ensure it's been approved for a particular employee. You should also confirm
which employees received a commission on deals they closed for the organization.

Withholding employer and employee taxes

Tax figures that are withheld from an employees' salary must be recorded
separately. An employee can determine how much they want to withhold when they
fill out their W-4 form on the first day of employment.

Some examples of taxes withheld from an employee's paycheck and cost employers
include:

 Federal income taxes


 Social security taxes
 Medicare taxes
 State income taxes (if necessary)

Withholding of salary, insurance premiums and savings plans

Depending on the benefits an employer offers, they'll withhold an employee's part of


healthcare premiums, savings plans for retirement or contributions to nonprofit
organizations. This way, you can segment how pieces of the employees' salaries are
withheld other than tax purposes.

Employer fringe benefits' expenses

Payroll accountants must include the cost of an employer to administer health and
dental benefits, give paid holidays, retirement and worker's compensation if needed.
All the information gathered here can help you budget and find out if you can expand
the benefits offered to employees.

This way you can generate each month payroll details records and
can edit or review later.

You can print pay sheets, pay slips for individual employers.

No need to install special software, no need special skill. But you


need Ms Access in your computer.

Now i have created very user friendly Ms Access program to


manage total HRM for any business.
Step 1: Create Main Basic Table

Open Ms Access.

Go to main menu & create table as mention with picture.

Add following details or your details what you pay to your staff
monthly.
Step 2: Create Query for Basic Main Table

Create a Query for basic main data table.


Step 3: Create Pay Sheet Details

Create a report base on monthly transaction for pay sheet.

Insert formula for auto calculate OT / No pay/ and net salary

Follow the image below.


Step 4: Create a Salary Slip

Create a salary Slip how you want to give to your staff as below.

Each and every details what you want to show in your staff salary
slip.
Step 5: Create a Form to Enter Data

Now create a form to enter data to your program.


Base on your table crate a form to enter data very easily.

Step 6: Enter Staff Details


3 More Images
Now you are already finish your program.

Enter staff details.

You might also like