|
·
Switchboards are the screens used
to navigate around a database and perform tasks, such as running
reports.
·
A switchboard is made of buttons
that you can click on. You can program these buttons to open forms,
reports, queries, etc.
·
This form is basically a customised
menu that contains user-defined commands; using either buttons,
labels, images or hyperlinks, that invoke actions that will
automatically carry out tasks for you such as opening other forms,
running queries or printing reports.
·
You can create a switchboard form
using various manual methods or by using the Microsoft Access
Switchboard Manager. The form can use either VBA procedures,
stored in modules behind the form or hyperlinks that either doesn’t
contain any associated code, or that can invoke functions from
standalone code modules.
·
Using a switchboard form in your
Microsoft Access database application allows you to tie together all
of the other objects that you have created for your database users
in a single form, and removes the need for the users to have to
openly navigate from within the database window. You can also use
this as the interface for your application, removing the chances of
your users tampering with any of the objects that lie behind the
scene of your application.
·
Using buttons on your switchboard
form can also replace the many possible steps that it would take the
user to navigate around the objects in the database. To simply open
a form in the database, the user may need to switch to the database
window, choose the Forms tab and open the form from there.
Using a command on the switchboard interface, the user now only has
to click one button to carry out the same action.
·
The Switchboard Manager is used to
create, delete, add, or edit switchboards.
·
Open Access.
·
Open the sample file called My
Database.
·
Click on the Database Tools
tab, and within the Database Tools group click on the
Switchboard Manager button.

·
The first time you will click on
the Switchboard Manager button it will prompt a message box
to create a new Switchboard.

·
Click on the Yes button. It
will open the Switchboard Manager dialog box and create a new
Switchboard called Main Switchboard.

·
Click on the Close button to
close the Switchboard Manager dialog box.
·
You can see the switchboard in the
left panel along with other tables, queries, and reports.

·
Click on the Database Tools
tab, and within the Database Tools group click on the
Switchboard Manager button. It will open the Switchboard
Manager dialog box.
·
In the Switchboard Pages
list you can see all the existing switchboards. Click on the New
button which will open the Create New dialog box.
·
Enter a name for the new
switchboard, i.e. enter Temp Switchboard and click on the
OK button.

It will add the created switchboard to the Switchboard Pages
list.

·
Click on the Close button on
the Switchboard Manager dialog box to close it.
·
Click on the Database Tools
tab, and within the Database Tools group click on the
Switchboard Manager button. It will open the Switchboard
Manager dialog box.
·
In the Switchboard Pages
list you can see all the existing switchboards. Select a
switchboard by clicking on it, i.e. select Temp Switchboard.

·
Click on the Delete button.
A message box will appear to confirm the deletion.

·
Click on the Yes button. It
will delete the selected Switchboard. Click on the Close
button in the Switchboard Manager dialog box to close it.
·
Click on the Database Tools
tab, and within the Database Tools group click on the
Switchboard Manager button. It will open the Switchboard
Manager dialog box.
·
Click on the Edit button.

·
It will open the Edit
Switchboard Page dialog box.

·
Click on the New button
which will open the Edit Switchboard Item dialog box.

·
In the Text field enter a
title for the item. We are going to create a button to open
FrmStudents, therefore enter the text Students Form.
·
In the Command field drop
down list select Open Form in Add Mode.

·
In the Form field select the
form to be opened, i.e. select FrmStudents from the drop down
list.

·
Click on the OK button.
This will add an item Students Form to the switchboard items.

·
Let’s add report RptStudents
to the switchboard.
·
Click on the New button. It
will open the Edit Switchboard Item dialog box.

·
In the Text field enter a
title for the item. Now we are going to create a button to open
RptStudents, therefore enter the text Students Report.
·
In the Command field drop
down list select Open Report.

·
In the Report field select
the report to be opened, i.e. select RptStudents from the
drop down list.

·
Click on the OK button.
This will add the item Students Report to the switchboard
items.

·
Click on the Close button to
close the Edit Switchboard Page dialog box.
·
Click on the Close button in
the Switchboard Manager dialog box to close it.
·
You will notice that in the left
panel under Switchboard items it has created a table called
Switchboard Items which stores the items for the switchboard,
and a switchboard form named Switchboard.

·
Double click on Switchboard in the
All Tables list. It will open the Switchboard form.

·
If you click on the Students
Form button on the Switchboard then it will open FrmStudents.

·
Click on the first tab (called
Switchboard) so that you can see the switchboard again, and
click on the Students Report button which will open
RptStudents.
·
Close all the forms, reports and
the Switchboard.
·
Click on the Database Tools
tab, and within the Database Tools group click on the
Switchboard Manager button.
·
It will open the Switchboard
Manager dialog box.
·
In the Switchboard Pages
list you can see all the existing switchboards.
·
Select a switchboard by clicking on
it and click on the Edit button.
·
This will open the Edit
Switchboard Page dialog box.

NOTE: As you can see you could edit the switchboard by
adding, deleting, moving up, moving down etc.
In this example, select Students Report and click on the
Move Up button.
·
Click on the Close button to
close the Edit Switchboard Page dialog box.
·
Click on the Close button in the Switchboard
Manager dialog box to close it.
·
Click on the Database Tools
tab, and within the Database Tools group click on the
Switchboard Manager button. It will open the Switchboard
Manager dialog box.
·
Select your switchboard and click
on the Edit button. It will open the Edit Switchboard Page
dialog box.
·
You can select an item from the
switchboard items list by clicking on it and then clicking on the
Delete button. In this case delete Students Report.

·
You will see a warning dialog box.
Click on the Yes button.

·
Click on the Close button to
close the Edit Switchboard Page dialog box.
·
Click on the Close button in
the Switchboard Manager dialog box to close it.
·
Click on the Database Tools
tab, and within the Database Tools group click on the
Switchboard Manager button. It will open the Switchboard
Manager dialog box.
·
Select your switchboard and click
on the Edit button. It will open the Edit Switchboard
Page dialog box.
·
You can select an item from the
switchboard items list by clicking on it and then click on the
Edit button.
·
It will open the Edit
Switchboard Item dialog box.

·
In this case we will simply change
the Text to My Student Form, as illustrated below.

·
Click on the OK button and
then click on the Close button to close the Edit
Switchboard Page dialog box.
·
Click on the Close button in
the Switchboard Manager dialog box to close it.
·
If you have more than one
switchboard, then you can make anyone of them as a default
switchboard.
·
Click on the Database Tools
tab, and within the Database Tools group click on the
Switchboard Manager button.
·
In the Switchboard Pages
list you can see all the existing switchboards.
·
Select a switchboard by clicking on
it and click on the Make Default button.

NOTE: It will make the Switchboard the default switchboard.
In this example we only have one Switchboard, but this illustrates
the principle.
·
Click on the Close button in
the Switchboard Manager dialog box to close it.
·
As this switchboard is a
navigational page and provide links to all the forms and reports in
your database, so you might like to display the switchboard as soon
as you open your database.
·
Click on the Office button
and in the drop down window click on the Access Options.

·
This will open the Access
Options dialog box. Click on the Current Database from
the left panel and in the Display Form drop down list in the
right window select your switchboard, i.e. select Switchboard.

·
Click on the OK button on
the bottom. A message box will appear to inform that your changes
will take effect when you close and open the database again.

·
Click on the OK button.
·
Close the database.
·
Open Access 2007 and reopen the
My Database sample file. You will see that the Switchboard
is automatically displayed when the database opens.
·
Close Access.
|