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

ACCESS 365 – EXERCISE 7

ACCESS 365 – EXERCISE 7

MENU FORMS

Content of the exercise:


TASK 1: CREATE AND EDIT THE INITIAL FORM ........................................................ 1
PROCEDURE .......................................................................................................... 2
Command buttons to open forms ...................................................................... 4
TASK 2: COMPLETE THE FORM (BUTTONS AND ACTIONS) ...................................... 8
Command button to close the Panel principal form ........................................... 9
Command button to close the database and the program .................................10
TASK 3: SET THE FORM TO BE DISPLAYED WHEN OPENING THE DATA BASE ..........12
FILE TO UPLOAD...................................................................................................13

TASK 1: CREATE AND EDIT THE INITIAL FORM

Now we are going to create the form that will be displayed when we open the
database Cibertodo; from this form the user will be able to:

❑ Open each of the forms created until now (exercise 6)


❑ Close the form called Panel inicial (menu form)
❑ Close the data base and the Access program

1
ACCESS 365 – EXERCISE 7

PROCEDURE

1- Open the database Cibertodo and click on the button Diseño del formulario
from the tab Crear (ribbon)

Click on the corner and widen


the form area (height: 14 cm;
width: 34 cm)

2- Save the form as Panel inicial. Don’t close it.

3- The new form only includes the Detalle section. In order to add a header
and a foot:

Right click on the bar of the


Detalle section and select the ot-
pion Encabezado o pie del for-
mulario

2
ACCESS 365 – EXERCISE 7

Before going on, delete the form foot by clicking on its lower edge and dragging
up to the Pie del formulario bar.

4- Enlarge the header by clicking on the Detalle bar and dragging down the
mouse (height: 4 cm). To the left of the header, insert the Cibertodo logo
as you did with the forms of exercise 6 (or you can copy it from some of
those forms). Enlarge the image to adjust its size to the new height of the
header.
5- Change the header background color to white.

6- Insert a label to the right of the image. The text will be the name of the
company (CIBERTODO). The format of the text will be the same you applied
to the other forms header labels, but the size of the font will be 48 pts.

Here you can see the final look of the header (in the Diseño view):

7- Now, change the Detalle section background color to dark blue (#04617B).

Next, we are going to insert command buttons in order to easy the actions
mentioned in the task (page 1).

3
ACCESS 365 – EXERCISE 7

Command buttons to open forms

1-
Click on Botón icon; then, click
into the Detalle section area (up
and left) and draw a little square
(fit it into a cell of the grid)

2- When you unclick, the command button wizzard beggins to run:

First step

As Categoría select Operaciones


con formularios. The specific ac-
tion the button must execute is
Abrir formulario. Then, click on Si-
guiente.

Second step

Keep this option selected and click


on Siguiente.

4
ACCESS 365 – EXERCISE 7

Third step

Keep this option selected and click


on Siguiente.

Fourth step:

Here you have to set the content of the button


(text or image or nothing). In this case, select
Texto and delete the content of the text box (we
want an empty button) and click on Siguiente

5
ACCESS 365 – EXERCISE 7

Fifth step:

Sixth step:

Call the new button Nuevo alqui-


ler and click on Finalizar

3- To the right of the button, insert a label with the text Nuevo alquiler. The for-
mat of the label will be:

Font: Courier New


Size: 18 ptos.
Style: negrita
Color: light beige (#F9CDAA) (label property: Color del texto).

6
ACCESS 365 – EXERCISE 7

4- Resize the label to fit the text. By the time being, this should be the form look:

5- Change to Vista Formulario (Ver, Vista Formulario) and click on the new but-
ton: the Alquileres form should open. Close the Alquileres form to go back to
Panel inicial.

7
ACCESS 365 – EXERCISE 7

TASK 2: COMPLETE THE FORM (BUTTONS AND ACTIONS)

According with the explained procedure (but choosing the proper form for each
of the buttons), create the following command buttons and their labels:

✓ Nuevo artículo: must open the Existencias form


✓ Nuevo título: must open the Títulos form
✓ Nueva venta: must open the Ventas form
✓ Nuevo cliente: must open the Clientes form

(So the introduction of a new category is very unlikely, it’s no necessary an es-
pecific button for that purpose.)
Once you have created and placed the buttons, the look of the form should be
similar to this:

In order to highlight the


central button panel, insert a
rectangle as frame. Click on
the Rectángulo icon from the
Controles group of the Diseño
tab. Then, on the Diseño sec-
tion, draw a rectangle to include the new buttons with their labels. Change the follow-
ing properties of the rectangle (Hoja de propiedades):

Ancho de los bordes: 3 pt


Color de los bordes: #A4D5E2 (azul claro)

8
ACCESS 365 – EXERCISE 7

If necessary, resize and move the rectangle so as the form looks like this:

Command button to close the Panel principal form

1- Click on the command button icon (Controles group, from the Diseño tab)
and draw the button on the pointed area

9
ACCESS 365 – EXERCISE 7

2- In the first step of the wizzard, select the options: Operaciones con formular-
ios and Cerrar formulario.

3- In the second step, select the option Texto and write Salir del panel inicial

4- In the third and last step, when you are asked for a form name, write Salir
del panel inicial.

5- The format of the text into the button will be: Courier New, 14 pts, bold and
centered (you can set these properties in the Hoja de propiedades panel)

Command button to close the database and the program

1- Insert this button below the Salir del panel inicial one.

2- Follow the wizzard as before, but, in the first step, select the options Aplica-
ción and Salir de la aplicación.

3- The name and text of the new button will be: Salir de Access.

4- The format of the text into the button will be: Courier New, 14 pts, bold and
centered (you can set these properties in the Hoja de propiedades panel)
With the new two buttons, the form should look like this:

Resize the form window, if necessary, so as to hide the empty areas and show
only the header and buttons.

10
ACCESS 365 – EXERCISE 7

Save the form and change to the Formulario view. The look of the form should
be something like this:

Check the buttons to be sure they work correctly (leave Salir de Access button to
the end, obviously).

11
ACCESS 365 – EXERCISE 7

TASK 3: SET THE FORM TO BE DISPLAYED WHEN OPENING THE DATA


BASE

Finally, we are going to set the Panel inicial form as the initial database form
(the first shown element of the database Cibertodo)

Besides, we will change the name of the application from Microsoft Access to
Cibertodo (only for this database, of course). And we will include the Cibertodo logo
on the upper left corner window of the whole database and each of the forms and
reports.

First, download the file logo cibertodo.ico from the module web.

Click on the Archivo tab, Opciones.

Select the Base de datos actual from the left panel and set the first options (right
panel) as shown below:

Título de la aplicación: Cibertodo

Check or keep
checked this
ckeckbox
Icono de la aplicación:
click on Examinar; find
and open the downloa-
ded file logo ciber-
Mostrar formulario: Panel inicial
todo.ico

12
ACCESS 365 – EXERCISE 7

To conclude, close the database and open it again. The Panel inicial form is
shown, with the Cibertodo logo on the corner. You can see the same logo on the upper
left corner of the program window. And, instead of the program name (Microsoft Ac-
cess), you can see the name of the database.

FILE TO UPLOAD
1- Cibertodo.accdb

13

You might also like