You are on page 1of 8

Ex 3(cont’d): Creating a form using form design and creating Switchboard

In this exercise, you will learn how to create a form using the form design tool. You have created
a form in the previous exercise but in that case there was no flexibility. Using the form design
allows you to be more creative in your design.
You will also learn how to create and use a switchboard. Basically the switchboard allows to
manage how you want the user to ‘see’ the tables, forms, queries, macros etc. that you have
created.
Before you can create a switchboard, you must first create some forms, queries, reports or
macros. However you can always add more of these items (forms, queries etc.) from time to
time.

Creating a form using form design

1. Open MS Access, select and open the file that you saved from the previous exercise, i.e.
CMT400Ex.accdb.
2. Click Create  Form Design. From the tools group of the Design tab, click the Add
Existing Fields which is located to the left of the Property Sheet. (See Fig. 3j).
3. We will first insert the title of this form. In the Controls group of the Design tab, find ‘title’
control, and click it. An orange rectangle with the word Form1 is displayed. We will edit
and change the title name later.
4. You can also insert an image. In the controls group of the Design tab, click the Logo
control. A Dialog box asking for the file name of the picture is displayed. Select any
picture and click ok. (See Fig. 3k).
5. On the right side in the Field List, you will see the list of table field that are available
depending on how many tables you have created. If a plus sign is shown next to the
name of the table, click the + sign so that you can see the names of all the fields in that
table.
6. Click the ID field. Now drag it to the working window. Then select all the other fields in
the table and drag them to a location below the ID field. (See Fig. 3l). All the fields are in
orange boxes, meaning that they are in selection mode i.e. you can edit and change
their properties.
7. To adjust the length of each field e.g. the student field. Click the student textbox. An
orange rectangle is shown. Move the mouse pointer until you see an arrow like this. 
Drag it to the right to the desired length. (See Fig. 3m).
8. You can move the fields to any place in the window as you wish.
9. You can also change the textbox for Sex and hometown to Combo box as has been
done in the previous exercise.
10. Let us change the name of the title of the form. First click the property Sheet located
next to the Add Existing Field. Make sure Form1 label is selected. In the Format tab of
the Property Sheet, in the Caption space, type Students Data Form. (See Fig. 3n).
11. Change the colour property of the title. Select the title label. On the property sheet find
the back color property in the format tab. Click the rectangle with the three dots. You
will a selection of colours. Select any color that you wish. You can change the color and
other properties of all the fields as you wish. For example to change the font color of the
label fields, find the fore color on the format property sheet, then choose the color that
you wish (See Fig. 3o). Click the form view to see the effect of the changes that you
have made. You can explore the other properties yourselves.
12. Save the form as Student data Form. Close the form
1
How to create a switchboard

13. On the ribbon click Database Tools and click Switchboard manager (Fig. 3p). A
dialog box appears asking whether you want to create a switchboard. Click Yes. A
switchboard manager is displayed.
14. Click edit to add items on the main switchboard. In the Edit Switchboard page, (Fig. 3q)
click New and type Display Form in the Text space. In the Command space, click the
arrow and choose Open Form in Edit mode. In Form, click arrow and choose the
Student Data Form. (See Fig. 3r). If you have not created any forms, you will see a
blank space when you click the Form arrow.
15. To add a query: To display a query, you have to run a macro and the macro must
contain an action to open a query. Refer to previous exercise. Assuming you have
created the macro, in the Edit Switchboard page, click new to add another item on the
switchboard. Type and select as shown in Fig. 3s.
16. You can also close the MS Access application by: Click New in Edit Switchboard Page.
Type Exit Access in Text space and select Exit Application in the Command section.
(Fig. 3t). You can add more switchboard items i.e. more queries, tables or reports.
17. Now close the Edit Switchboard Page and the Switchboard Manager.
18. On the navigation panel, find the Switchboard form and double click the form. (Fig 3u).
Click the Female query. The query will be displayed. Click the Display form, the Student
data Form will be displayed.
19. Finally, if you want the switchboard to be displayed when you open MS Access:
Click the Customize Quick Access Toolbar. (Fig. 3v). From the given options, Select
More Commands. Then choose Current Database. In the Display Form, select
Switchboard. (Fig. 3w). Click Ok. You have to close the application and reopen Access
for the command to be effective. Do this (close application) after you have saved your
work. You will find that after you reopen the application it will display the main
switchboard form.
20. Close and save your work.

2
Fig. 3j

Fig. 3k

3
Fig. 3l

Fig. 3m

4
Fig. 3n

Fig. 3o

5
Fig. 3p

Fig. 3q

Fig. 3r

Fig. 3s

6
Fig. 3t

Fig. 3u

7
Fig. 3v

Fig. 3w

You might also like