Module 4-Microsoft Access
Module 4-Microsoft Access
For Example:
You can connect a customers order information with their contact
details.
How to Use Microsoft Access
• Open Microsoft Access
- Open the Microsoft Access Application
• Add a Table
- Use the Table Design view to create your first table.
- Tables are where your data is stored in Access. You can create a table from scratch or use
the “Table Design” view to set up your fields (columns). Each field represents a different piece of
information you want to store.
• Add Data to the Table
- Switch to “Datasheet view” to enter data into your table.
- Once you’ve set up your table with the fields you need, switch to “Datasheet view” to start
entering your data.
• Create a Form
- Use the Form Wizard to make data entry easier.
- Forms in Access make data entry simple and user-friendly. You can create a form using the
“Form Wizard,” which walks you through the process and lets you select which fields to include.
• Run Queries
- Use the Query Design view to retrieve specific data.
- Queries are how you ask questions of your database. For example, you might want to see all
orders placed in the last month. The “Query Design” view helps you set up these questions and view the
answers.
Using Microsoft Access
• Save your work frequently. Databases can be complex, and
you don’t want to lose your progress.
• Use naming conventions for your tables and fields to keep
things organized.
• Back up your database regularly to prevent data loss.
• Take advantage of Access templates if you’re new to
database design.
• Use forms to ensure data is entered consistently.
Can I import data from Excel into Access?
Yes, you can import data from Excel into Access. This can be
done by using the “External Data” tab and selecting “Excel”
as the source.
Is Microsoft Access easy to learn?
Yes, multiple users can access the same database. You can
set up a shared network location or use Access’s split-
database architecture to allow multiple users to work with
the data simultaneously.
ACCESS Components/
Objects:
• A Table allows the user to store a collection of data about a specific
topic like Customers or Orders. Relationships can be established
among the tables to access and manage the data easily.
• A Form allows a user to enter/change/update data to tables.
• A Query allows the user to view, change, manipulate, and analyze
data in different ways like combining data from two different tables
(Customers and Orders) to create a user’s own custom view.
• A Report is an effective way to output your data in a printed format
in the way you want it.
Table
Table is an object that is used to define and store data. When you create a new
table, Access asks you to define fields which is also known as column headings.
• Everything that can be done in a macro can also be done in a module, but you don't get
the macro interface that prompts you what is needed for each action.
• Modules are far more powerful, and are essential if you plan to write code for a multi-
user environment, because macros cannot include error handling.
• Modules can be standalone objects containing functions that can be called from
anywhere in your application, or they can be directly associated with a form or a report
to respond to events on the associated form or report.
MS Access - Data Types
• The data type determines the kind of the values that users can store in any given field.
• Each field can store data consisting of only a single data type
Let us try and create the first table that will store the basic contact information concerning the
employees as shown in the following table:
Table Design View
As we have already created one table using Datasheet View. We will now create another
table using the Table Design View. We will be creating the following fields in this table.
These tables will store some of the information for various book projects.
MS Access - Adding Data
• A datasheet is a simple way to look at your data in rows and columns without any special formatting.
• Whenever you create a new web table, Access automatically creates two views that you can start
using immediately for data entry.
• A table open in Datasheet View resembles an Excel worksheet, and you can type or paste data into
one or more fields.
• You do not need to explicitly save your data. Access commits your changes to the table when you
move the cursor to a new field in the same row, or when you move the cursor to another row.
• By default, the fields in an Access database are set to accept a specific type of data, such as text or
numbers. You must enter the type of data that the field is set to accept. If you don't, Access displays
an error message
Let us add some data into your
tables by opening the Access
database we have created.
MS Access - Query Data
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.
1. Open the database and click on the Create tab.
2.Click Query Design.
3.In the Tables tab, on the Show Table dialog, double-click the tblEmployees table and
then Close the dialog box.
4.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.
Now click Run on the Design tab, then click Run.