Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

ACCESS 365 - INTRODUCTION

ACCESS 365 - INTRODUCTION

STRUCTURE OF A DATA BASE: TABLES, QUERIES, FORMS


AND REPORTS

Content of the exercise:


INTRODUCTION (SCTRUCTURE OF A DATABASE) ...............................................1
TABLES: .........................................................................................................3
QUERIES: .......................................................................................................5
FORMS: .........................................................................................................5
TASK 1: DESIGN, EXECUTE AND SAVE A QUERY ..................................................7
TASK 2: CREATE AND SAVE A QUICK FORM ......................................................12
FILES TO UPLOAD ............................................................................................13

INTRODUCTION (SCTRUCTURE OF A DATABASE)

ACCESS is a program designed to create and manage data base files.

A data base is a structured set of data with a common link.

Examples: data of a business (clients, employees, suppliers, products…), a


library (volumes, titles, shelving, rooms...), a high school (levels, groups, students,
teachers…), an airport (flights, flying companies, terminals...). In these cases, the
common link is the business, the library, the high school or the airport.

Access allows us to design, create and manage a data base (that’s to say,
look up information, insert new data, delete other ones, etc)

1
ACCESS 365 - INTRODUCTION

You can examine the structure of a data base by downloading and opening
some of the on-line templates from the left panel displayed when running Access.

1º- Here we will use the data base NORTHWIND; you could download it from
the Microsoft Office’s official web, but, in order to shortcut, download it (file
Northwind.accdb) from Classroom. Then, open the file (by double clicking on it).

If this message ap-


pears, click on Habili-
tar contenido

2º.- The first element you can see is this message:

This is a form to customize the data base de-


pending on the employee that you choose
Click on Iniciar sesión

The displayed window shows us the form Inicio. For


the time being, we are not interested in it. To the left of
Click on the double arrow to con-
this form window, you can see the Navigation Panel.
tract this section. Do the same
with the sections Consultas and
Formularios

2
ACCESS 365 - INTRODUCTION

The navigation panel change to this look:

Tablas, Consultas, Formularios, Informes, Macros and Módulos are the typ-
ical objects of any data base. Here, we are only going to take a look over the first
four.

.
Close the form Inicio by clicking on the cross to
the upper right corner of the form window

TABLES:

They include all the data we want to store about any element: clients, work-
ers, products…

Click on this arrow to display the


tables.

3
ACCESS 365 - INTRODUCTION

Next, double click on the first table of the


data base (they are sorted by alphabetical or-
der): Clientes.

Tabla Clientes

Each client’s data included in the base is a field


(campo). Fields are sorted in columns.

Each client of
the table is a
register. Reg-
isters are
sorted in
rows.

This structure is the same for any table in the base. Its design requires a
careful previous planning; we’ll come back on it in exercise 10.

4
ACCESS 365 - INTRODUCTION

QUERIES:

Queries are instructions given to Access (or any data base software) in order
to get (from the data base) and show only the information we are interested
about.

Than information is displayed in a new table, but this table only exists when
the user executes the query (it exist only as an instruction).

FORMS:

Generally, the forms are only a different (and more attractive) way to display
the data included in the tables and make easy the data introduction. Usually, the
forms allow us to execute some actions by clicking on command buttons.

A form looks like an index card. Any register of the table is shown on a dif-
ferent index card. Here you can see the form Detalles de Clientes from the data
base Northwind:

Click here to go to the last


Click here to show the follow- client (register)
ing client (register) Click here to add a new client (register)

5
ACCESS 365 - INTRODUCTION

This form includes additional elements like: command buttons, a list box to
search a specific client and an extra tab with an order subform. These elements
aren’t an essential part of the form and, by the time being, we are going to forget
them (we will work on them later).

REPORTS:

The reports display the information of tables or queries with a suitable for-
mat to be printed.

We aren’t going to create any report, now.

6
ACCESS 365 - INTRODUCTION

TASK 1: DESIGN, EXECUTE AND SAVE A QUERY

Make a query on the table Clients which shows only surnames and name of
the Purchasing Managers (Jefes de Compras):

1º.- Firstly, close the table Clientes by clicking on the upper right cross of the
table’s window.

2º.- Display the queries of the data base on the left pane (Todos los objetos
de Access)

3º.- Select the option Crear from the program ribbon:

Click on Diseño de
consulta.

In the dialog box Mostrar tabla, se-


lect the table Cllentes and click on
Agregar. Next, click on Cerrar.

7
ACCESS 365 - INTRODUCTION

Double click on the field Apellidos. Then, suc-


cessively double click on the fields Nombre y
Cargo.

4º.- Lower half of the window looks like a table.

Selected fields and the table they be-


long appear (in columns) on the lower
half of the window.

8
ACCESS 365 - INTRODUCTION

5º.- Next, we have to specify that we want only to see the contact people
whose position in the company is Purchasing Manageer (Jefe de Compras):

On the row Criterios of the column


Cargo, write Jefe de compras and un-
check the checkbox Mostrar (so all the
displayed employees will be sales rep-
resentative, it’s no use to show this in-
formation)

7º.- In this step, the query has to be executed:

Click on the button Ejecutar (Diseño tab,


from the ribbon)

9
ACCESS 365 - INTRODUCTION

The result is shown on a two columns table (so we are only interested about
two fields: surnames and name; the field Cargo, though selected in order to filter
the data, is hidden)

Wide the columns a bit to


show the whole surname
and name

Click on this icon (on the quick ac-


cess Office bar) to save the query...

Write Jefes de compras as


name of the query and ac-
cept.

10
ACCESS 365 - INTRODUCTION

Close the query (the table displayed on execut-


ing the query) and notice that its name now appears
on the queries list of the left pane. In the future, you
only have to execute the query (by double clicking on
it) to get a list of the sales representative.

This is a bit complex example to begin with; in the next ex-


ercise (Queries 1) we will start with simpler queries, without data
filtering or hidden fields.

11
ACCESS 365 - INTRODUCTION

TASK 2: CREATE AND SAVE A QUICK FORM

Creating a simple form is very easy. You are going to insert one form to show
each product in a different index card:

1º.- Display the table list on the left pane Todos los objetos de Access. Select
the table Pedidos de compra but don’t open it

2º.- Click on the button Formulario


from the Crear tab (ribbon)

The form is immediately created (though it’s a very basic form, without for-
mat)

This is a subform, which shows


the suppliers who send the
products to the company.

12
ACCESS 365 - INTRODUCTION

3º.- Click on the disk icon from the tools bar to save the form; accept the
proposed name (Pedidos de compra).

Close the form and display the forms list on the left pane Todos los objetos
de Access. Notice that the new form now appears in the list. Finally, close the form.

FILES TO UPLOAD
1- Northwind.accdb

13

You might also like