MS Access
MS Access
MS Access
What Is Access?
Microsoft Access is a database management system (DBMS) that is used to store and manage data. This is a member
of the Microsoft Office suite.
Microsoft Access is also an Information Management Tool that allows you to store information for referencing,
reporting, and also analyzing.
Just like Microsoft Excel, Access allows the users to view and edit data. One of the features that make Access better
than Excel is that it can take in more data at a stretch.
Microsoft Access provides the users, the features of a database, and the programming proficiencies to create an
easy-to-navigate screen (Forms). Not only that, Access helps to process a large bunk of information and manages
them effectively and efficiently.
Microsoft Access saves data in its format based on the Access Jet Database Engine, and can also link or import
directly to the data that are stored in other applications or databases.
Just like every other Microsoft application, Access also supports the use of Visual Basic for Application (VBA)
To use Microsoft Access, you will need to follow the procedures below
Database Creation: The first thing to do is create a database and indicate what type of data to be stored in
the database
Data Input: After creating a database, the next thing to do is enter the data into the database.
Report: This is where information from the database is organized in a nice and presentable manner that can
be printed out in an Access report
There are many benefits attached to the use of Microsoft Access and some of them will be outlined below
Cost Of Development: One of the benefits of using Microsoft Access is that it is less expensive compared to
the larger database systems like Oracle, SOL server, etc., which requires a huge amount of set up and high
maintenance costs
Software Integration: One of the notable features of Microsoft Access being a product of the Microsoft
Office suite is that it can integrate well with two other apps in the MS office suite.
Legacy Data: Microsoft Access can easily import many data formats, in such a way that the existing data is
retained and not lost. It does not only save 100’s of hours of input time but can remove potential human
input errors.
Distribution: Microsoft Access has its Jet Database format that contains both the application and data in one
file. With the ability of having the application and data together in one place, it is convenient to distribute
the applications to many users, who can, in turn, run the apps in disconnected environments.
Microsoft Access provides a fully functional, relational database management system in a few minutes.
Microsoft Access can function well with many of the development languages that work on Windows OS.
With Microsoft Access, you can create tables, queries, forms, reports, and connect using the macros.
Microsoft Access allows the users to link data from its existing location and manipulate it for viewing,
updating, querying, and reporting.
Microsoft Access allows for customizing according to personal and company needs.
Microsoft Access executes any challenging or difficult office or industrial database tasks.
Access in its uniqueness can function with the most popular databases that are compatible with Open
Database Connectivity (ODBC) standards, including SQL Server, Oracle, and DB2.
With Access, software developers can use Microsoft Access to develop application software
Microsoft Access requires less code to get work done unlike SQL server and some other client-server
database).
Microsoft Access is a very good tool for creating database applications with a large array of readily available
functionality.
Another reason you need to use Access is that it is flexible i.e., it allows you to put together a custom
database and later change as needs are likely changes as needs arise.
Access can be used alongside VBA, a programming language. Developers can create a custom solution for
their database using the VBA code, an effective programming language that contains codes or commands for
specific programs.
Microsoft Access allows users to choose any of the four ways to view reports:
Report view
Print view
Layout view
Design view
Microsoft Access is a simple desktop application that does not need any particular hardware or license to
function. Thus, making it more suitable and cost-effective for individual users and smaller teams who do not
need larger and complicated databases for an extra price.
Users of Access do not need to undergo any special training to get the skills needed to use this application. In
a nutshell, Access is easy to master especially to users who are conversant with the use of Excel
What Is a Database ?
A database is a tool that is used for the collection and organization of information. The database can store
information about people, products, orders, etc. The database stores its information in a single file and the file
contains database objects, which are the components of the database. The database consists of six components
which are listed below
Tables
Queries
Forms
Reports
Macros
Modules
Tables
This is the heart of the database where data are defined and stored in rows and columns. Here, you can create as
many tables as you need to store all kinds of information. The following are what you should keep in mind when
using the table
Query
This is one of the objects in the database that gives a custom view of data from one or more tables. The query
selects sorts and filters data based on the search criteria. Take note of the following hints when using the query
Building a query in Access implies that you are defining the specific search conditions to find precisely the
data you need
You can define your queries to Select, Update, Insert, or Delete data
You can also set queries that create new tables from the data in one or more existing tables
Form
Form is also one of the databases objects that is mainly created for data input, display, or control of application
executions. Forms can be used to modify the presentation of data that the application extracts from queries or data.
Not only that, forms give an easy way to view or change information in a table. Note the following about forms
Forms is a database object used for creating a user interface for database application
Forms are used from time to time because they are easy to guide people to entering data correctly
When you input data into a form in Access, the data goes precisely the database designer wants it to go in
one or more related tables
Forms also display live data from the table. This aimed at easing the process of entering or editing data.
Report
Report is also an object of the database that is used to format, calculate, print, and summarize selected data. The
report helps to print some or all of the data in a selected data. Report allows you to choose where the information is
displayed on the printed page, and how it is grouped, sorted, and formatted. Take note of the following when
working with report
You can view or display a report on your screen before printing it out
Reports are very important because they permit for the displaying of the database components in an easy-
to-read manner
Macro
Macros are mini computer programming constructs that the users to set up commands and processes in the forms.
Some of the activities in the form include searching, moving to another record, and running of formula. With macros,
you can customize your data, even without being a programmer. Take note of the following tips about macro in the
Microsoft Access
The macros can be used to open and execute queries, to open tables, or to print or view reports.
You can run other macros or Visual Basic procedures from within a macro
Macros can attach data directly to table events such as inserting new records, editing existing records, and
deleting records
Data macros in web apps can also be stand-alone objects which can be called from other data or macro-
objects.
Module
A module is an object in the database that contains the procedures which are used in the Visual Basic for Application
(VBA). With these procedures, you can do anything. The modules give a more distinct flow of actions and permit the
users to trap errors. Take note of the following when using the modules to execute any operation in Access
Whatever can be done in the macro can also be done in the modules
Modules are most suitable when the users intend to write codes for a multi-user environment, unlike the
macros which cannot do error handling
The modules being a standalone object can be called from anywhere in the application, or they can be linked
with a form or a report to react to events on the associated form or report.
»»Fields: It can be likened to a column in a conventional table, it is the categories of information inside the
database table.
»»Records: It can be likened to a row in a conventional table, it shows all the recorded data about each
category whether of a person or anything.
»»Cells: Just like a conventional table, a cell is the intersection of field and record inside a database. It is the
point where you can enter a piece of data
»»Foreign key or field: It is used to link information in database tables i.e., it shows the relationship
between two database tables by relating it with the primary key. The unique column that is compared with another
column during comparison is known as a primary key.
»»Primary key field: This is a field in each database table whose values uniquely identify other fields across
the table.
»»Relational database: This is the type of database where data is stored in more than one database table. It
helps to organize data into the table that can be related together based on the fact that data must be common to
each other, for instance, a company that recorded the first database table with customer details and another
database describing individual customer transactions. The database used to have more than one database table but
a situation may warrant it that it will have only one database in such situation it is called file flat database.
»»Dynaset: It refers to the process of taken data or a set of data in one or more database tables i.e., the
outcome of your search within the database.
»»Object: The object comprises various components used in constructing a database such as database
tables, queries, forms, reports, macros, and modules. They will be discussed at length later inthis section.
Microsoft Access Data Types
The data types are the properties of each field in a table. These properties are what define the features and
performance of the fields in a table. The Datatypes determine the type of values the users can store in any given
field. Below is the table of the most common data types that can be used in the Microsoft Access database
Auto Number This assigns a unique number Four bytes (16 bytes
when a new record is created or if it is set as a
added to a table. Replication ID)
A field, you remember, is where your data lives. Each field holds one piece of data, such as Last Name or Batting
Average. Because there are so many different kinds of information in the world, Access offers a variety of field types
for storing it. In fact, Access puts the following field types at your disposal:
»»Short Text
»»Long Text
»»Number
»»Currency
»»AutoNumber (this data type is applied, by default, to the starting ID field in any new table)
»»Date/Time
»»Yes/No
»»Rich Text
»»Attachment
»»Hyperlink
»»OLE Object
»»Calculated
»»Lookup Wizard
The types just listed are those available for fields you create in addition to that first field — the ones that will contain
your data.
»»Short Text: Stores up to 255 characters of text — letters, numbers, punctuation, and any combination
thereof.
»»Long Text: This replaces the Memo field type found in versions 2010 and previous. A Long Text field holds
up to 64,000 characters of information — that’s almost 18 pages of text. This is a really big text field. It’s great for
general notes, detailed descriptions, and anything else that requires a lot of space.
Numbers in a text field aren’t numbers to calculate with; they’re just a bunch of digits hanging out together
in a field. Be careful of this fact when you design the tables in your database — you don’t want to enter, say, a value
that you intend to use in a Calculated field or to extract some other kind of information from a report and have that
value stored as text, rendering it inoperable as a number. If the data is numeric, store it that way. Text fields have
one setting you need to know about: size. When you create a text field, Access wants to know how many characters
the field holds. That’s the field size. If you create a field called First Name and make its size 6, Joseph fits into the
field, but not Jennifer. This restriction can be a problem. A good general rule is to make the field a little larger than
you think you need. It’s easy to make the field even larger at some later point if you need to, but it’s potentially
dangerous to make it smaller. Surgery on fields is covered in Chapter 4.
»»Number: Holds real, for-sure numbers. You can add, subtract, and calculate your way to fame and fortune
with number fields. But if you’re working with dollars and cents (or pounds and pence), use a Currency field instead.
»»Currency: Tracks money, prices, invoice amounts, and so on. In an Access database, the buck stops here.
For that matter, so do the lira, the mark, and the yen. If you’re in the mood for some other kind of number, check
out the Number field.
»»Date/Time: Stores time, date, or a combination of the two, depending on which format you use. Use a
Date/Time field to track the whens of life. Pretty versatile, eh?
»»Yes/No: Holds Yes/No, True/False, and On/Off, depending on the format you choose. When you need a
simple yes or no, this is the field to use.
»»Lookup & Relationship: If you want a field within one table to actually display content from a field in
another table, choose this as the field type. A simple Lookup Wizard opens as soon as this field type is chosen,
through which you select the table and field to look up through this new field in your table.
»»Rich Text: Need the content of a particular field to be formatted just so? Choose this field type, and the
formatting applied to the data in the field (using the Text Formatting tools on the Home tab) will be how it appears
onscreen and in reports.
»»OLE Object: You can use the OLE Object data type to link or embed an object — such as an Excel
worksheet or Word document — to an Access table.
»»Attachment: Use this field type to attach files — Word documents, Excel worksheets, PowerPoint
presentations, or any other kind of file, including graphics (a photo of the volunteer, product, or location, perhaps?)
— to the record.
»»Hyperlink: Thanks to this field type, Access understands and stores the special link language that makes
the Internet such a powerful place. If you use Access on your company’s network or use the Internet extensively, this
field type is for you. You’ll find out more about hyperlinks and other neat ways Access and the Internet play well
together in Chapter 11.
»»Calculated: Use this field type when you want to fill the field in question with the result of a formula that
uses one or more other fields in the same table. For example, in a table that contains a list of your products, other
fields might include Price and Discount. If you want to also have a field that calculates the new price (the Price, less
the Discount), you’d make that a Calculated field. When you choose this as the field type, you use a submenu to
choose what kind of data will house the result, and then an Expression Builder dialog box appears, through which
you set up the formula.
To help you start thinking about your database and your data and to begin imagining the fields you could use
for some common types of data, Below Table presents a breakdown of field types and ways you might use them.