0% found this document useful (0 votes)
2K views43 pages

Short Notes On MS Access

This document provides an overview of Microsoft Access and databases. It explains that a database is a collection of data organized into lists or tables. In Access, tables store the data in rows (records) and columns (fields). Forms, queries, and reports allow users to enter, search, analyze, and present the data stored in the tables. Forms are used to enter and view records, queries search for and compile data from tables, and reports present data from tables or queries in a printed format. Together these objects interact with the table data to create a functional database.

Uploaded by

Harish Kulgod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views43 pages

Short Notes On MS Access

This document provides an overview of Microsoft Access and databases. It explains that a database is a collection of data organized into lists or tables. In Access, tables store the data in rows (records) and columns (fields). Forms, queries, and reports allow users to enter, search, analyze, and present the data stored in the tables. Forms are used to enter and view records, queries search for and compile data from tables, and reports present data from tables or queries in a printed format. Together these objects interact with the table data to create a functional database.

Uploaded by

Harish Kulgod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Short Notes on MS Access

Introduction:
Microsoft Access is a database creation and management program. To understand
Access, you must first understand databases.
In this lesson, you will learn about databases and how they are used.

What is a database?
A database is a collection of data that is stored in a computer system. Databases allow
their users to enter, access, and analyze their data quickly and easily. They're such a
useful tool that you see them all the time. Ever waited while a doctor's receptionist
entered your personal information into a computer, or watched a store employee use a
computer to see whether an item was in stock? If so, then you’ve seen a database in
action.
The easiest way to understand a database is to think of it as a collection of lists. Think
about one of the databases we mentioned above: the database of patient information at
a doctor's office. What lists are contained in a database like this? To start with, there's
a list of patients' names. Then there's a list of past appointments, a list with medical
history for each patient, a list of contact information, and so on.
This is true of all databases, from the simplest to the most complex. For instance, if you
like to bake you might decide to keep a database containing the types of cookies you
know how to make and the friends you give these cookies to. This is one of the simplest
databases imaginable. It contains two lists: a list of your friends, and a list of cookies.

However, if you were a professional baker, you would have many more lists to keep
track of: a list of customers, a list of products sold, a list of prices, a list of orders, and
so on. The more lists you add, the more complex the database will be.
In Access, lists are a little more complex than the ones you write on paper. Access stores
its lists of data in tables, which allow you to store even more detailed information. In
the table below, the People list in the amateur baker’s database has been expanded to
include other relevant information on the baker’s friends.

If you are familiar with other programs in the Microsoft Office suite, this might remind
you of Excel, which allows you to organize data in a similar way. In fact, you could
build a similar table in Excel.
Why use a database?
If a database is essentially a collection of lists stored in tables and you can build tables
in Excel, why do you need a real database in the first place? While Excel is great at
storing and organizing numbers, Access is far stronger at handling non-numerical
data, like names and descriptions. Non-numerical data plays a significant role in almost
any database, and it's important to be able to sort and analyze it.
However, the thing that really sets databases apart from any other way of storing data
is connectivity. We call a database like the ones you’ll work with in Access a relational
database. A relational database is able to understand how lists and the objects within
them relate to one another. To explore this idea, let's go back to the simple database
with two lists: names of your friends, and the types of cookies you know how to make.
You decide to create a third list to keep track of the batches of cookies you make and
who they’re for. Because you're only making cookies you know the recipe for and
you're only going to give them to your friends, this new list will get all of its information
from the lists you made earlier.
See how the third list uses words that appeared in the first two lists? A database is
capable of understanding that the Dad and Oatmeal cookies in the Batches list are the
same things as the Dad and Oatmeal cookies in the first two lists. This relationship
seems obvious, and a person would understand it right away; however, an Excel
workbook wouldn’t.
Excel would treat all of these things as distinct and unrelated pieces of information. In
Excel, you'd have to enter every single piece of information about a person or type of
cookie each time you mentioned it because that database wouldn't be relational like an
Access database. Simply put, relational databases can recognize what a human can: If
the same words appear in multiple lists, they refer to the same thing.
The fact that relational databases can handle information this way allows you
to enter, search for, and analyze data in more than one table at a time. All of these
things would be difficult to accomplish in Excel, but in Access even complicated tasks
can be simplified and made fairly user friendly.

Introduction to Objects
Databases in Access are composed of four objects: tables, queries, forms, and reports.
Together, these objects allow you to enter, store, analyze, and compile data however
you want.
In this lesson, you will learn about each of the four objects and come to understand
how they interact with each other to create a fully functional relational database.
Tables
By this point, you should already understand that a database is a collection of data
organized into many connected lists. In Access, all data is stored in tables, which puts
tables at the heart of any database.
You might already know that tables are organized into vertical columns and
horizontal rows.
In Access, rows and columns are referred to as records and fields. A field is more than
just a column; it’s a way of organizing information by the type of data it is. Every piece
of information within a field is of the same type. For example, every entry in a field
called First Name would be a name, and every entry in field called Street
Address would be an address.

Likewise, a record is more than just a row; it's a unit of information. Every cell in a
given row is part of that row’s record.

Notice how each record spans several fields. Even though the information in each
record is organized into fields, it belongs with the other information in that record. See
the number at the left of each row? It’s the ID number that identifies each record. The
ID number for a record refers to every piece of information contained on that row.
Tables are good for storing closely related information. Let's say you own a bakery
and have a database that includes a table with your customers' names and information,
like their phone numbers, home addresses, and email addresses. Because these pieces
of information are all details on your customers, you’d include them all in the
same table. Each customer would be represented by a unique record, and each type of
information about these customers would be stored in its own field. If you decided to
add any more information—say, a customer's birthday—you would simply create a new
field within the same table.

Forms, queries, and reports


Although tables store all of your data, the other three objects—forms, queries,
and reports—offer you ways to work with it. Each of these objects interacts with
the records stored in your database's tables.
Forms
Forms are used for entering, modifying, and viewing records. You likely have had to
fill out forms on many occasions, like when visiting a doctor's office, applying for a
job, or registering for school. The reason forms are used so often is that they're an easy
way to guide people toward entering data correctly. When you enter information into a
form in Access, the data goes exactly where the database designer wants it to go: in one
or more related tables.

Forms make entering data easier. Working with extensive tables can be confusing, and
when you have connected tables you might need to work with more than one at a time
to enter a set of data. However, with forms it's possible to enter data into multiple tables
at once, all in one place. Database designers can even set restrictions on individual form
components to ensure all of the needed data is entered in the correct format. All in all,
forms help keep data consistent and organized, which is essential for an accurate and
powerful database.
Queries
Queries are a way of searching for and compiling data from one or more tables.
Running a query is like asking a detailed question of your database. When you build a
query in Access, you are defining specific search conditions to find exactly the data
you want.
Queries are far more powerful than the simple searches you might carry out within a
table. While a search would be able to help you find the name of one customer at your
business, you could run a query to find the name and phone number of every customer
who's made a purchase within the past week. A well-designed query can give
information you might not be able to find just by looking through the data in your tables.

Reports
Reports offer you the ability to present your data in print. If you've ever received a
computer printout of a class schedule or a printed invoice of a purchase, you've seen a
database report. Reports are useful because they allow you to present components of
your database in an easy-to-read format. You can even customize a report's appearance
to make it visually appealing. Access offers you the ability to create a report from
any table or query.
Putting it all together
Even if you have a good idea of how each object can be used, it can initially be difficult
to understand how they all work together. It helps to remember that they all work with
the same data. Every piece of data a query, form, or report uses is stored in one of
your database tables.

Forms allow you to both add data to tables and view data that already exists.
Reports present data from tables and also from queries, which then search
for and analyze data within these same tables.
These relationships sound complicated, but in fact they work together so well and
naturally that we often don't even notice when we're using connected database objects.
Have you ever used an electronic card catalog to search for a book at the library?
Chances are, you entered your search into something that looks like this:
When you performed your search, you were entering your search terms into a form that
then created and ran a query based on your request. When the query finished searching
the database's tables for records that matched your search, you were shown
a report that drew information from the query and the related tables—in this case, a
list of books matching your search terms. You could represent the connections between
the objects like this:

Let's say instead of using these tools you had to search within a giant table containing
every book in the library system. The relevant records would likely be spread out across
many tables: a table for book titles and descriptions, a table containing information on
which books are checked in or out, and a table with each branch of the library, just to
name a few.
You'd have to search at least three tables just to find a book, learn its location, and see
whether it's checked in! It's easy to imagine how difficult it could become to find the
right book. If you weren't careful, you might even mess something up by accidentally
deleting or editing a record. It's easy to see how the database objects make this search
much more manageable.
A relational database, is a database that is able to understand how different sets of
data relate to one another. Situations like the example above are exactly why people
find relational databases so useful. Without a relational database, what should be a
simple task—searching for a book and seeing if it's checked in and where—becomes
incredibly complicated and time consuming. Knowing how to use the four Access
objects can make even complicated tasks fairly user friendly.
Getting Started in Access
Whenever you're learning a new program, it's important to familiarize yourself with the
program window and the tools within it. Working with Access is no different. Knowing
your way around the Access environment will make learning and using Access much
easier.
In this lesson, you will familiarize yourself with the Access environment, including
the Ribbon, Backstage view, Navigation pane, Document Tabs bar, and more. You
will also learn how to navigate with a navigation form, if your database includes one.
Access 2016 uses the Ribbon to organize commands, just like in Access 2013 and
2010. If you've used these versions before, Access 2016 will feel familiar. But if you
are new to Access or have more experience with older versions, you should first take
some time to become familiar with the Access 2016 interface.
Click the buttons in the interactive below to become familiar with the Access interface.

Working with your Access environment


If you've previously used Access 2013 or 2010, Access 2016 will feel familiar. It
continues to use features like the Ribbon and the Quick Access Toolbar—where you
will find commands to perform common tasks in Access—as well as Backstage view.
The Ribbon
Access uses a tabbed Ribbon system instead of traditional menus. The
Ribbon contains multiple tabs, each with several groups of commands. For example,
the Clipboard group on the Home tab contains commands such as Cut, Copy, and Paste.
Some groups also have a small arrow in the bottom-right corner that you can click for
even more options.

To minimize and maximize the Ribbon:


The Ribbon is designed to respond to your current task; however, you can choose
to minimize the Ribbon if you find that it takes up too much screen space.
1. Click the arrow in the lower-right corner of the Ribbon to minimize it.

2. The Ribbon will be minimized. Click a tab to make the Ribbon reappear. It will
disappear again when not in use.

3. To maximize the Ribbon, click a tab, then click the pin icon in the lower-right
corner. The Ribbon will appear at all times.
Using the Tell me feature
If you're having trouble finding command you want, the Tell me feature can help. It
works just like a regular search bar: Type what you're looking for, and a list of options
will appear. You can then use the command directly from the menu without having to
find it on the Ribbon.

The Quick Access Toolbar


The Quick Access Toolbar, located above the Ribbon, lets you access common
commands no matter which tab you are on. By default, it shows the Save, Undo,
and Redo commands. If you'd like, you can customize it by adding additional
commands.

Note that the Save command only saves the current open object. In addition,
the Undo command will not undo certain actions, like adding a record. Pay close
attention to your information when using the Undo command to make sure it has the
desired effect.
Backstage view
Backstage view gives you various options for saving, opening, and printing your
database.
To access Backstage view:
1. Click the File tab on the Ribbon.
2. Backstage view will appear.
Click the buttons in the interactive below to learn more about using Backstage view.

The Navigation pane


The Navigation pane is a list containing every object in your database. For easier
viewing, the objects are organized into groups by type. You can open, rename,
and delete objects using the Navigation pane.

To minimize and maximize the Navigation pane:


The Navigation pane is designed to help you manage all of your objects; however, if
you feel that it takes up too much of your screen space, you can minimize it.
1. To minimize the Navigation pane, click the double arrow in the upper-right
corner.

2. The Navigation pane will be minimized. Click the double arrow again to
maximize it.
If you want to make the Navigation pane smaller without fully minimizing it, you
can resize it. Simply click and drag the right border of the Navigation pane. When it is
the desired size, release your mouse.

Object sorting in the Navigation pane


By default, objects are sorted by type, with tables in one group, forms in another, and
so on. However, if you want you can sort the objects in the Navigation pane into groups
of your choosing. There are four sort options:
 Custom allows you to create a custom group for sorting objects. After applying
the sort, simply drag the desired objects to the new group.
 Object Type groups objects by type. This is the default setting.
 Tables and Related Views groups forms, queries, and reports with the tables
they refer to.
 Created Date or Modified Date sorts objects based on when they were created
or last edited.
To sort objects in the Navigation pane:
1. Click the drop-down arrow to the right of All Access Objects, then select the
desired sort from the drop-down menu.
2. The objects in the Navigation pane will now be sorted to reflect your choice.

To further customize the appearance of the Navigation pane, you can minimize
groups of objects you don't want to see. Simply click the upward double arrow next
to the group name. To show a group, click the downward double arrow.

Databases with navigation forms


Some databases include a navigation form that opens automatically when the database
is opened. Navigation forms are designed to be a user-friendly replacement for
the Navigation pane. They contain tabs that allow you to view and work with common
forms, queries, and reports. Having your frequently used objects available to you in one
place lets you access them quickly and easily.
To open an object from a navigation form, click its tab. The object will be displayed
within the navigation form. Once an object is open, you can work with it as you
normally would. In the example below, the navigation form has tabs near the top left
for orders, customers, and menu items, and each one will open a corresponding object.

Generally, navigation forms include only the objects a typical user will need to work
with fairly regularly, which is why your navigation form may not include every single
form, query, or report. This makes it easier to navigate the database. By hiding tables
and rarely used forms, queries, and reports, it also reduces the chance of the database
being damaged by users accidentally editing or deleting necessary data.
For this reason, it's important to ask your database designer or administrator before
working with objects that are not available in your navigation form. Once you have the
go-ahead, you can simply maximize the Navigation pane and open the objects from
there.

Designing Your Own Database


Now that you know how to use and modify existing databases, you might be interested
in designing your own. Database design can be very complicated—so complicated, in
fact, that people take extensive courses just to learn how to plan them. For this reason,
we haven't focused on creating a database from scratch. However, we can help you get
started.
In this lesson, you will learn how to create a database from an existing template. You
will also learn about other resources you can use to understand database design.
To create a database from a template:
Before deciding to build your own database, you may want to look at
the templates included in Access to see if any of them match your needs. When you
select a template, Access creates a new database based on that template. Once it's
created, you can fill the database with your own information or modify it to suit your
needs.
Note that some Access 2016 templates require you to save the database online
with Microsoft SharePoint. Many businesses use SharePoint to share files at work.
Select the File tab. This will take you to Backstage view.

1. Click New.

2. Several templates will appear below the Blank desktop database option. You
can also click a suggested search to find templates or use the search bar to
find something more specific.
3. Select a template to review it.

4. A preview of the template will appear, along with additional information on


how the template can be used.
5. Click Create to use the selected template.
6. A new database will appear with the selected template.
It's important to note that not all templates are created by Microsoft. Many are created
by third-party providers and even individual users, so some templates may work
better than others.

Managing Databases and Objects


Each Access database consists of multiple objects that let you interact with data.
Databases can include forms for entering data, queries for searching within
it, reports for analyzing it, and tables for storing it. Whenever you work with your
database, you are working with many of these objects at once. Fortunately, Access
makes managing these objects pretty easy.
In this lesson, you will learn how to to open and close databases, as well as how
to open, close, and save objects.

To open an existing database:


Before you enter data or modify your objects, you will need to open your database.
1. Select the File tab to go to Backstage view.
2. Click Open.

3. Click Browse.
4. The Open dialog box will appear. Locate and select the database, then
click Open.
5. One or more warning messages may appear when you open your database. If
the database contains customized functions, a yellow bar with a security
warning may appear below the Ribbon. If you trust the source of your database,
click Enable Content for your database to display correctly.

6. After enabling all content in the database, you may see a message asking if you
want to make the database a Trusted Document. Click Yes if you would like
all content to be automatically enabled each time you open the database.

You may also be prompted to sign in to the database. Select your name from the login
list. If your name does not appear, click Add User to enter your information.
To close a database:
1. Select the File tab to go to Backstage view.
2. Select Close.
If you have any unsaved objects, a dialog box will appear for each one asking if you
would like to save it. Select Yes to save the object, No to close it without saving,
or Cancel to leave your database open.
Working with objects
It's helpful to think of your database as a large binder or folder in which you store your
data. The data itself is contained in database objects. Access treats each of these objects
as separate documents, which means you will have to open and save them individually
in order to work with them.
You may have noticed that this lesson contains no instructions for saving a database.
This is because you cannot save an entire database at once. Rather, you must
individually save the objects contained within the database.
To open an object:
1. In the Navigation pane, locate and double-click the desired object.

2. The object will appear as a tab in the Document Tabs bar.

By default, the most recently opened object will appear in the main window as
the current object. To view another open object, click its tab in the Document Tabs
bar.
Saving objects
You'll need to save any changes you make to each object before closing your database.
Remember, saving early and often can prevent your work from being lost. However,
you will also be prompted to save any unsaved work when you attempt to close your
database.
To save a new object:
1. Select the object you want to save by clicking its tab in the Document Tabs
bar.
2. Click the Save command on the Quick Access Toolbar, or press Ctrl+S on
your keyboard.

3. The first time you save an object, you will be prompted to name it. Enter the
desired object name, then click OK.

4. The object will be saved. Click the Save command again to save any changes
to the object.
To close an object:
1. Select the object you want to close, then click the X to the right of the Document
Tabs bar.

2. If there are any unsaved changes to the object, you will be prompted to save it.
Select Yes to save, No to close it without saving your changes, and Cancel to
leave the object open.
You can also close an object by right-clicking its tab on the Document Tabs bar and
selecting Close. Select Close All to close all open objects.

To rename an object:
1. If the object you want to rename is open, close it.
2. In the Navigation pane, right-click the desired object, then select Rename.

3. Type the new object name, then press Enter on your keyboard.

Working with Tables


While there are four types of database objects in Access, tables are arguably the most
important. Even when you're using forms, queries, and reports, you're still working with
tables because that's where all of your data is stored. Tables are at the heart of any
database, so it's important to understand how to use them.
In this lesson, you will learn how to open tables, create and edit records, and modify
the appearance of your table to make it easier to view and work with.
Table basics
To open an existing table:
1. Open your database, and locate the Navigation pane.
2. In the Navigation pane, locate the table you want to open.
3. Double-click the desired table.

4. The table will open and appear as a tab in the Document Tabs bar.

Understanding tables
All tables are composed of horizontal rows and vertical columns, with small rectangles
called cells in the places where rows and columns intersect. In Access, rows and
columns are referred to as records and fields.
A field is a way of organizing information by type. Think of the field name as a
question and every cell within that field as a response to that question. In our example,
the Last Name field is selected, which contains all the last names in the table.
A record is one unit of information. Every cell on a given row is part of that row's
record. In our example, Quinton Boyd's record is selected, which contains all of the
information related to him in the table.

Each record has its own ID number. Within a table, each ID number is unique to its
record and refers to all of the information within that record. The ID number for a record
cannot be changed.
Each cell of data in your table is part of both a field and a record. For instance, if you
had a table of names and contact information, each person would be represented by a
record, and each piece of information about each person—name, phone number,
address, and so on—would be contained within a distinct field on that record's row.
Click the buttons in the interactive below to learn how to navigate a table.
Navigating within tables
The bar at the bottom of the table contains many commands to help you search or scroll
through records.
 To navigate through records in a table, you can use the up and down arrow
keys, scroll up and down, or use the arrows in the Record Navigation
bar located at the bottom of your table.

 You can create a new record with the new (blank) record command on
the Record Navigation bar.
 You can find any record in the currently open table by searching for it using
the record search box. Place your cursor in the search box, type any word that
appears in the record you want to find, and press the Enter key.

To navigate between fields, you can use the left and right arrow keys or scroll left
and right.
Adding records and entering data
Entering data into tables in Access is similar to entering data in Excel. To work with
records, you'll have to enter data into cells. If you need help entering data into records,
you might want to review our Cell Basics lesson from our Excel 2016 tutorial.
To add a new record:
There are three ways to add a new record to a table:
 In the Records group on the Home tab, click the New command.

 On the Record Navigation bar at the bottom of the window, click the New
record button.

 Begin typing in the row below your last added record.

Sometimes when you enter information into a record, a window will pop up to tell you
that the information you've entered is invalid. This means the field you're working with
has a validation rule, which is a rule about the type of data that can appear in that field.
Click OK, then follow the instructions in the pop-up window to re-enter your data.
To save a record:
Access is designed to save records automatically. After you enter a record, you can
either select a different record or close the object, and Access will save the record.
However, in certain situations you many want to save a record manually. For example,
if you needed to edit an existing record, you could save the record to ensure your
changes are saved.
1. Select the Home tab, and locate the Records group.
2. Click the Save command. The record will be saved.

Editing records
To quickly edit any record within a table, you can click it and type your changes.
However, Access offers you the ability to find and replace a word within multiple
records and delete records entirely.
To replace a word within a record:
You can edit multiple occurrences of the same word by using Find and Replace, which
searches for a term and replaces it with another term.
1. Select the Home tab, and locate the Find group.
2. Select the Replace command. The Find and Replace dialog box will appear.

3. In the Find What: field, type the word you want to find, then in the Replace
With: field type the word you want to replace the original word. In our example,
we'll find instances of the word Fall and replace it with Autumn.
4. Click the Look In: drop-down arrow to select the area you want to search.
Select Current Field to limit your search to the currently selected field.
Select Current Document to search within the entire table.

5. Click the Match: drop-down arrow to select how closely you'd like results to
match your search. Select Any Part of Field to search for your search term in
any part of a cell. Select Whole Field to search only for cells that match your
search term exactly. Select Beginning of Field to search only for cells that start
with your search term.

6. Click Find Next. If the text is found, it will be selected.


7. Review the text to make sure you want to replace it. Click Replace to replace
the original word with the new one.

8. Access will move to the next instance of the text in the object. When you are
finished replacing text, click Cancel to close the dialog box.
The Replace All option is powerful, but it may actually change some things you don't
want to change. In the example below, the word fall did not refer to the season, so
replacing it with Autumn would be incorrect. Using the normal Replace option allows
you check each instance before replacing the text. You can click Find Next to skip to
the next instance without replacing the text.

To delete a record:
1. Select the entire record by clicking the gray border on the left side of the
record.
2. Select the Home tab and locate the Records group.
3. Click the Delete command.

4. A dialog box will appear. Click Yes.

5. The record will be permanently deleted.


The ID numbers assigned to records stay the same even after you delete a record. For
example, if you delete the 205th record in a table, the sequence of record ID numbers
will read ... 204, 206, 207 ... rather than ... 204, 205, 206, 207 ...

Modifying table appearance


Access offers various ways to modify the appearance of tables, including resizing fields
and rows and temporarily hiding information you don't need to see. These changes
aren't just about making your table look good; they also can make the table easier to
read.
Resizing fields and rows
If your fields and rows are too small or large for the data contained with them, you can
always resize them so all of the text is displayed.
To resize a field:
1. Place your cursor over the right gridline in the field title. Your mouse will
become a double arrow.
2. Click and drag the gridline to the right to increase the field width or to the left
to decrease the field width, then release the mouse. The field width will be
changed.

To resize a row:
1. Place your cursor over the bottom gridline in the gray area to the left of the
row. Your mouse will become a double arrow.

2. Click and drag the gridline downward to increase the row height or upward to
decrease the row height, then release the mouse. The row height will be
changed.
Hiding fields
If you have a field you don't plan on editing or don't want other people to edit, you
can hide it. A hidden field is invisible but is still part of your database. Data within a
hidden field can still be accessed from forms, queries, reports, and any related tables.
To hide a field:
1. Right-click the field title, then select Hide Fields.

2. The field will be hidden.


If you decide you want the field to be visible again, you can unhide it. Simply right-
click any field title, then select Unhide Fields. A dialog box will appear. Click the
checkboxes of any fields you want to be visible again, then click Close.
Table formatting options
Alternate row color
By default, the background of every other row in an Access table is a few shades darker
than the background of the rest of the table. This darker alternate row color makes
your table easier to read by offering a visual distinction between each record and the
records directly above and below it.

To change the alternate row color:


1. Select the Home tab, locate the Text Formatting group, and click
the Alternate Row Color drop-down arrow.

2. Select a color from the drop-down menu, or select No Color to remove the
alternate row color.

3. The alternate row color will be updated.


Modifying gridlines
Another way Access makes your tables easier to read is by adding gridlines that mark
the borders of each cell. Gridlines are the thin lines that appear between each cell, row,
and column of your table. By default, gridlines are dark gray and appear on every side
of a cell, but you can change their color and hide undesired gridlines.

To customize which gridlines appear:


1. Select the Home tab, locate the Text Formatting group, and click
the Gridlines drop-down arrow.

2. Select the gridlines you want to appear. You can choose to


have horizontal gridlines between the rows, vertical gridlines between the
columns, both types of gridlines, or none at all.

3. The gridlines on your table will be updated.


Additional formatting options
To view additional formatting options, click the Datasheet Formatting arrow in the
bottom-right corner of the Text Formatting group.

The Datasheet Formatting dialog box offers several advanced formatting options,
including the ability to modify background color, gridline color, and border and line
style. It even includes the ability to view a sample table with your formatting choices,
so play around with the various formatting options until you get your table looking the
way you want it.

Sorting and Filtering Records


Access gives you the ability to work with enormous amounts of data, which means it
can be difficult to learn anything about your database just by glancing at
it. Sorting and filtering are two tools that let you customize how you organize and
view your data, making it more convenient to work with. In this lesson, you'll learn how
to sort and filter records.
Essentially, sorting and filtering are tools that let you organize your data. When you
sort data, you are putting it in order. Filtering data lets you hide unimportant data and
focus only on the data you're interested in.
Sorting records
When you sort records, you are putting them into a logical order, with similar data
grouped together. As a result, sorted data is often simpler to read and understand than
unsorted data. By default, Access sorts records by their ID numbers. However, there
are many other ways records can be sorted. For example, the information in a database
belonging to a bakery could be sorted in a number of ways:
 Orders could be sorted by order date or by the last name of the customers who
placed the orders.
 Customers could be sorted by name or by the city or zip code where they live.
 Products could be sorted by name, category (like pies, cakes, and cupcakes),
or price.
You can sort both text and numbers in two ways: in ascending order
and descending order. Ascending means going up, so an ascending sort will arrange
numbers from smallest to largest and text from A to
Z. Descending means going down, or largest to smallest for numbers and Z to A for
text. The default ID number sort that appears in your tables is an ascending sort, which
is why the lowest ID numbers appear first.
In our example, we will be performing a sort on a table. However, you can sort records
in any Access object. The procedure is largely the same.
To sort records:
1. Select a field you want to sort by. In this example, we will sort by customers'
last names.

2. Click the Home tab on the Ribbon, and locate the Sort & Filter group.
3. Sort the field by selecting the Ascending or Descending command.
4. The table will now be sorted by the selected field.

5. To save the new sort, click the Save command on the Quick Access Toolbar.

After you save the sort, the records will stay sorted this way until you perform another
sort or remove the current one. To remove a sort, click the Remove Sort command.

Filtering records
Filters allow you to view only the data you want to see. When you create a filter, you
set criteria for the data you want to display. The filter then searches all of the records
in the table, finds the ones that meet your search criteria, and temporarily hides the ones
that don't.
Filters are useful because they allow you to focus in on specific records without being
distracted by the data you're uninterested in. For instance, if you had a database that
included customer and order information, you could create a filter to display only
customers living within a certain city or only orders containing a certain product.
Viewing this data with a filter would be far more convenient than searching for it in a
large table.
In our examples and explanations, we will be applying filters to tables. However, you
can apply filters to any Access object. The procedure is largely the same.
To create a simple filter:
1. Click the drop-down arrow next to the field you want to filter by. We will filter
by city because we want to see a list of customers who live in a certain city.

2. A drop-down menu with a checklist will appear. Only checked items will be
included in the filtered results. Clicking Select All will select or deselect
everything at once. In our example, we'll deselect everything except Cary.

3. Click OK. The filter will be applied. Our customers table now displays only
customers who live in Cary.

Toggling your filter allows you to turn it on and off. To view the records without the
filter, click the Toggle Filter command. To restore the filter, click it again.
Creating a filter from a selection
Filtering by selection allows you to select specific data from your table and find data
that is similar or dissimilar to it. For instance, if you were working with a bakery's
database and wanted to search for all products whose names contained the
word chocolate, you could select that word in one product name and create a filter with
that selection. Creating a filter with a selection can be more convenient than setting up
a simple filter if the field you're working with contains many items. You can choose
from the following options:
 Contains includes only records with cells that contain the selected data.
 Does Not Contain includes all records except for those with cells that contain
the selected data.
 Ends With includes only records whose data for the selected field ends with
the search term.
 Does Not End With includes all records except for those whose data for the
selected field ends with the search term.
To create a filter from a selection:
1. Select the cell or data you want to create a filter with. We want to see a list of
all of our products that contain the word chocolate in their names, so we'll select
the word Chocolate in the Product Name field.

2. Select the Home tab on the Ribbon, locate the Sort & Filter group, and click
the Selection drop-down arrow.
3. Select the type of filter you want to apply. We'll select Contains
"Chocolate" because we want to see records that contain the
word Chocolate anywhere in the field.

4. The filter will be applied. Our table now displays only products with the
word Chocolate in their names.

Creating a filter from a search term


You can also create a filter by entering a search term and specifying the way Access
should match data to that term. Creating a filter from a search term is similar to creating
a filter from a selection.
Filtering text by a search term
When filtering text by entering a search term, you can use some of the same options
you use when filtering by a selection, like Contains, Does Not Contain, Ends With,
and Does Not End With. You can also choose from the following options:
 Equals, which includes only records with data that is identical to the selected
data
 Does Not Equal, which includes all records except for the data that is identical
to the selection
 Begins With, which includes only records whose data for the selected
field begins with the search term
 Does Not Begin With, which includes all records except for those whose data
for the selected field begins with the search term
To filter text by a search term:
1. Click the drop-down arrow next to the field you want to filter by. We want to
filter the records in our orders table to display only those that contain notes with
certain information, so we'll click the arrow in the Notes field.

2. In the drop-down menu, hover your mouse over Text Filters. From the list that
appears, select the way you want the filter to match the term you enter. In this
example, we want to view only records whose notes indicate the order was
placed for a party. We'll select Contains so we can search for records that
contain the word party.

3. The Custom Filter dialog box will appear. Type the word you want to use in
your filter.

4. Click OK. The filter will be applied.


Filtering numbers with a search term
The process for filtering numbers with a search term is similar to the process for
filtering text. However, different filtering options are available to you when working
with numbers. In addition to Equals and Does not Equal, you can choose:
 Greater Than to include only records with numbers in that field that
are greater than or equal to the number you enter
 Less Than to include only records with numbers in that field that are less than
or equal to the number you enter
 Between to include records with numbers that fall within a certain range
To filter numbers by a search term:
1. Click the drop-down arrow next to the field you want to filter by. We want to
filter the records in our menu items table by price, so we'll click the arrow in
the Price field.
2. In the drop-down menu, hover your mouse over Number Filters. From the list
that appears, select the way you want the filter to match your search term. In
this example, we want to see items that are less than $5, so we'll select Less
Than.

3. The Custom Filter dialog box will appear. Type the number or numbers you
want to use in your filter. We'll type 5 so the filter will show us only menu items
that cost $5 or less.

4. Click OK. The filter will be applied.


Specific types of numbers may include other filtering options. For
instance, dates stored in numerical form (mm/dd/yyyy or 12/01/2013) include options
to filter by periods of time.

You might also like