Sie sind auf Seite 1von 24

EXAM MANAGEMENT SYSTEM DATABASE

Create a new database called Exam Management System and design tables as shown below and
save to your H drive
1. Create the 2 tables below following the designs indicated

Make sure you set the Data Type for the Primary Key to Autonumber for the Exam table

2. Create the Form shown below based on the Mentor table. Include all fields and modify the
design as shown below

3. Use the Mentor Details Form to enter the data shown here for the Mentors

4. Import the tables called Student and Subject which you will find in the Exam database on
my website (and perhaps on S also)

Exam Management System Database

Page 1

Una Dooney

Relationships
Create a one-to-many relationship between the Mentor Code fields in the Mentors table and the
Student table. Make sure to enforce Referential Integrity. This means that a Mentor Code cannot
be entered in the Student table unless it exists in the Mentor table or a record of a Mentor cannot
be deleted from the Mentor table if there is reference to it in the Student table
COMBO BOXES
A combo box helps the user to input data more easily when using a form by allowing the operator to
choose data from a list instead of having to key it in.
The Student Registration Form
1
Create a new form linked to the Student table. Add all fields except Finish Date and
Certificate
2
Create a combo box for the Course field
(i)
Delete existing Course field from the form
(ii)

Click on Control Wizard (it must be turned on)

(iii)
(iv)
(v)

Click on the Combo box tool


Draw a rectangle where you want the new Course field to be
The wizard will now guide us through the process. If the wizard does not take over at
this stage it means the wizard was NOT turned on so you need to start again!
(vi) Select I will type in the values I want
(vii) In the next screen type in the values you see below for the Courses
(viii) The values to be displayed in the combo box are:
Computer
Programming
Information
Technology
Web Design
3

4
5

(ix) Set the Limit to List property to Yes


Create a combo box for the Mentor Code field
(i)
Select 'I want the combo box to look up the values in a table or query' and click Next
(ii)
Select the Mentor table - click Next
(iii) Add Mentor Code and Mentor Name to the combo box and click Next
(iv) Ensure the Hide Key column is ticked - click Next
(v)
Store value in the Mentor Code field - click Next
(vi) Enter Mentor as the label for the combo box - click Finish
Modify the Form to resemble the one shown below
Set tab order as follows: Student Code, Firstname, Surname, Address1, Address2, Address3,
Course, Start Date, Mentor Code
(i)
To set the Tab Order go to View/Tab Order and rearrange the fields in the order in which
you want to tab to travel around the form
Save the form as Student Registration

Exam Management System Database

Page 2

Una Dooney

Using the Student Registration Form enter the 5 remaining records at the end of the Student Table
shown in the document on the S drive entitled Student Table or on my website.
Notice that when you select a Mentor Name from the drop-down list, the Mentor Code is entered in
the Student table and not the name
REPORTS
Report 1
1 Create a report that lists students by course (See extract below to use as a guide)
2 Add Firstname, Surname and Course fields to the report
3 Group the report by Course
4 Sort in ascending order of Surname
5 Select an appropriate layout, orientation. Select Corporate as the report style. The report title
is List of Current Students
6 Add a function to calculate the total number of students in each course.
(i)

(ii)

(iii)

We will use the count function which is =count(). This is done by adding a textbox
to the Group Header of your Form Design and typing in exactly what you see below. You
will delete the label that will be automatically produced with the text box
Inside the brackets we have put the name of the field we want Access to count and this
is in square brackets [Surname]. We are using this field but we could have used the
StudentCode field just as well (or any field that would give us the number of students on
the course).
Start with the equals sign (=), enclose any text strings in double quotes " " and use the &
sign to join strings with the predefined count function

Exam Management System Database

Page 3

Una Dooney

Report 2
1. Create a report that lists students by Mentor
2. This report requires fields from the Student table and the Mentor table so we must perform
a query first
3. Create a query based on the Student and Mentor tables. Add Mentor Name from the Mentor
table and the student Firstname, Surname and Course fields from the Student table. Save
the query as Mentors and Students
4. Now create the report based on the query
5. Add all fields to the report
6. Group by Mentor Name
7. Sort in ascending order of Surname
8. Select and layout and orientation. Select Corporate as the style. The report title is Mentor
Groups
9. Add a function to calculate the total number of students in each group

Exam Management System Database

Page 4

Una Dooney

Create a Form linked to the Subject table as you see below. Save the form as Subject Details

Add the Exam table and the Subject table to the Relationships in your database and Save
EXAM REGISTRATION FORM
This form will be used to register students for exams. We need the Exam Number, Student Code,
Subject Code and Exam Period fields.

Because the fields required for the form are based on 2 tables, we need to perform a query and add
the Exam table and the Student table to the Design window so that we can use fields from both
tables in the form
Create a Query
1. From the Student table add the Firstname and Surname fields
2. From the Exam table add Exam Number, Student Code, Subject Code and Exam Period fields
3. Save the query as Join tables for Exam Registration (If you look at the results of this
query you will see an empty table! That is fine as we have no students registered for
exams yet)
Create the Exam Registration Form
1. Create a form based on the Join query you have just saved
2. Add all fields from the query
3. When asked how you want to view your data Select by Exam
Exam Management System Database

Page 5

Una Dooney

4. Give the form the title Exam Registration Form and save the form as Exam Registration
5. Now modify the form to include the following combo boxes
Create the following combo boxes. Remember to delete the old field first before putting in the
replacement. We will use a combo box to look up Student Codes to make it easier when we are
entering data when registering students for exams. The combo box will display the Student Code
and Student Name but will enter the Student Code in the field.
Combo Box 1
1. Create a combo box for the Student Code field
2. Select 'I want the combo box to look up the values in a table or query' and select Student
table
3. Add Student Code, Firstname and Surrname to the Combo box
4. Remove the tick from Hide key column box
5. Select Student Code as the value in the combo box to store in the database and store this
value in the Student Code field
6. Enter Student as the label for the combo box
Combo
1.
2.
3.
4.
5.
6.
7.

Box 2
Create a combo box for the Subject Code field
Select 'I want to look up values in a table or query' and select the Subject table
Add Subject Code and Subject Title to the combo box
This time tick Hide the key column
Store the value in the Subject Code field
Enter Subject as the label for the combo box
View the properties of the combo box and set the Column widths to 0 cm; 10 cm and the
List width to 8 cm. This makes the list wide enough to take any of the subjects on offer

Combo Box 3
1 Create a combo box for the Exam Period field
2 Select 'I will type in the values'. See values below:
Exam Period
(Combo box)
Summer 2003
Christmas 2003
Summer 2004
Christmas 2004
Summer 2005
Christmas 2005
3 Select 'Store values in this field' and select ExamPeriod
4 Name the combo box Exam Period
5 Set the combo box properties as follows:
(i)
Set Limit to List property to Yes
(ii)
Set Tab Stop property to No for Exam number (because the Exam number is Autonumber
so we do not want the cursor to stop at this field on the form)
6 Set tab order to Student Code, Subject Code and Exam Period
7 Save the form again as Exam Registration

Exam Management System Database

Page 6

Una Dooney

Enter Data to Register Students for Exams


Now using the Exam Registration Form register the following students for Database Methods,
Communications, Word Processing and Information and Communication Systems for the Summer
2003 exam period. Each exam will have a unique number, which will be entered automatically
since the ExamNumber field is of data type Autonumber
Maura Clohosey
Tony Gallagher
Michael O Neill
John Murphy (03IT004)
Deirdre Moroney
Colin Evans
Eamonn Twomey
Nora Sheehan
Susan Wright
Sean Noonan
Register the following students for Database Methods, Communications, Programming and Software
Development for the Summer 2003 exam period
Domnic Brennan
Brendan Dunne
Tadhg Scanlan
Diarmuid Scott
Rod Hogan
Register the following students for the Database Methods, Communications, Word Processing and ECommerce for the summer 2003 exam period
Ciara Mooney
Robin Carr
Elaine Mc Carthy
Paula King
John Murphy (03WD0005)
Once you have inputted all the data you should have about 80 records in the Exam table, into which
the data is automatically entered as you register students using the form. Look at your Exam table
to see this.
Create a Query
Create a query to find Exam Registrations by Subject and Period. This is a parameter query (see
below).
A Parameter Query
A parameter query is a query that, when it runs, displays its own dialog box prompting you for
information. You can design the query to prompt you for more than one piece of information; for
example we want to be prompted for Exam Period (ie Summer 2003 or Christmas 2003) and then the
Subject Title (ie Web Authoring or Communications or Graphic Design) so that the results of the
query will give us only those students that have registered for a particular Exam sitting in a
particular Subject. The query can be run entering different parameters each time and you will get
a different set of records each time.
What you see below is just an extract from the query design window. To conduct this query we
need the Student, Exam and Subject tables in that order (it is easier to view sometimes when you
add the tables in a particular order!)

From Student table add Student Code, Firstname, Surname and Course fields

Exam Management System Database

Page 7

Una Dooney

From the Exam table add Exam Number, Exam Period, Exam Date and Result fields

From the Subject table add Subject Title

This is just
an extract
from the
query
design

To create a parameter query we key in a message in the Criteria line of the query design screen. If
we want the query to display the message 'Enter Exam Period' and 'Enter Subject Title' when it is run
we enter those exact messages on the Criteria line as shown here (Make sure you enclose the
message in the square brackets as shown and in the correct column). Each time you run the query
you will be prompted for the criteria you wish to use. The query will then find all exam
registrations relating to the exam period and subject title entered when the query is run.
Save the query as Find student registrations by subject

Test the query by entering Summer 2003 and Programming as the criteria and you should get
5 records

Test again with Summer 2003 and Communications and you should get 20 students as all
students must do Communications

Run it again with Summer 2003 and Web Authoring. You will find that there are no students
are registered for this subject in this exam sitting

Create a Report
1 Create a report based on the Find student registrations by subject query
2 Add the Subject Title, Exam Period, Firstname, Surname and Course fields
3 Sort in ascending order of Student Code
4 Select Corporate style
5 Title is Exam Lists by Subject
6 In Design view move the Subject Title and Exam Period fields to the report header area
7 Include the college address in the report header (Copy it from an existing Form if you can)
8 Draw a label box in the report header area and enter a message for students who are not
registered for the exam that says:
If you would like to sit this exam but your name is not listed
below, please contact your Mentor as soon as possible
9 Test the report by entering a different subject each time. Remember that each time you run
the report the query must run first so you will be prompted for the parameters of the report
you want.
10 The Subjects that you have are only those listed in your Subject table and are Programming,
Software Development, Web Authoring, Communications, Graphic Design etc.
(i)
The Courses we have (just 3) are Computer Programming, Web Design and Information
Technology
(ii)
Make sure that when you are running the report you enter one of the Subjects as that is
the field we have in the report and not the Course
11 Preview the report and you should get something like this if you choose the parameters
Summer 2003 as the Exam Period and Programming as the subject
12 We will now use a Function to count the number of students that are registered for a
particular exam and display it in the report header area
(i)
Create a text box (later you can delete the text box label). DO NOT use a label box or
this will NOT work
(ii)
Enter the following in the text box exactly as you see it
=There are & count([Surname]) & students sitting the & [SubjectTitle]&
exam
Exam Management System Database

Page 8

Una Dooney

This should place a message at the end of the Report that you see below

Report shown is of students who have registered for Graphic Design in the Christmas 2003 exams.

EXERCISES
1. Create a report for the students who have registered for the Summer 2003 exam in Information
and Communication Systems
2. Create a report for the students who have registered for the Christmas 2003 exam in Spreadsheet
Methods

PRODUCE DISK LABELS


Produce Disk Labels using a report to use for student disks for an exam:
Use the Exam Lists by Student report for this exercise
1

In the database window select Reports and New

In the New Report window select Label Wizard and choose the query Find student registration by
subject and Click OK

Exam Management System Database

Page 9

Una Dooney

3
4
5
6
7
8
9
10

Choose Metric in Unit of Measure


Choose Sheet Feed and Avery from the Label type
Choose label L7161 (or whatever label you know you have for printing on)
Choose font style, size and weight
Add the fields to the label that you want and in the order in which you want them to appear
Choose a Sort order if you want one
Choose a Name to store this label definition by (eg Disk labels for Student Practical Exams)
Click Finish

Labels can also be produced to address envelopes with student results and for lots of other purposes.
It is a useful feature of the database.

ENTER EXAM RESULTS


To develop our database further we will now deal with exam results. To enter exam results
efficiently there are a couple of conditions.
1 We want to see only the subject relating to a particular exam sitting
2 We want only those records where the exam result field is currently empty
These conditions need to be specified in a query first and we will need the Student, Exam and
Subject tables for the query

CREATE QUERY
For
1
2
3
4
5
6
7

the query we need:


From Student table - Student Code, Firstname, Surname
From Exam table - Exam Period, Exam Date and Result
From Subject table - Subject Title
Enter parameters for the query so that, when we run it, it asks for Exam Period and Subject title
Enter the condition that it will only display records where the Result field is empty (in other
words the student does not already have a result in this subject)
Sort the query in ascending order of Student Code field
Save the query as Exams with no Results entered

CREATE FORM
1
2
3
4

Create a form linked to the query you have just done


Add all fields to the form
The form name is Enter Exam Results and its title is Exam Results
Move the Exam Period field to the form header section from the detail section

Exam Management System Database

Page 10

Una Dooney

Set enabled property to No for Student Code, Firstname, Surname, Subject Title and Exam
Period fields (The purpose of this is that these fields cannot be edited when results are being
entered)
Create a combo box for the Results field. Select I will type in the values which are Distinction,
Merit, Pass and Fail. A suggested layout and format are shown here

MACROS
A macro is a series of commands, specified by the user, which can be saved and executed quickly
again by perhaps pressing just one key on the keyboard. Macros can be created to carry out common
tasks such as finding or adding records in a database. Macros can also be used to develop a user
interface by creating custom menus, making it easier and quicker for the database user to carry out
tasks.
In the database we have created there is one disadvantage to the system we have devised for
entering exam results. Because we have linked this operation to a parameter query, each time we
want to enter results from a different exam sitting we have to close the form and open it again and
enter the parameters. We are now going to devise a macro that will solve this little problem.
We will create a macro that will
1 Close the Enter Exam Results form and
2 Open the Enter Exam Results form and ask for the Exam Period and Subject Title for which you
want to enter results

CREATE A MACRO
In the database menu select Macros and New
The following window appears:

Exam Management System Database

Page 11

Una Dooney

We must specify commands in the Action column. When the macro is run the commands will execute
in sequence. A Comment is a short statement describing the function of particular line in the macro.
Its purpose is simply to inform the database user of what the action is intended to achieve! A
comment has no effect on the operation of the macro.
1 Select Close from the Action column

2
3

Save = No relates to saving changes to the design of the form. It does not affect the entering of
records in the form.
Select OpenForm Command

Click on Save and enter Next Set of Results as the name of the Macro

Open the Enter Exam Results form in Design view

6
7

Check that the control wizard is on and click on the Command Button
Click and drag the mouse to the right of the surname on the form

Exam Management System Database

Page 12

in the toolbox

Una Dooney

8
9
10
11
12

You are asked What action do you want to happen when button is pressed?
Select Miscellaneous
Select Run Macro
Select the Next set of results macro that you have written
A picture or text can be inserted in the command button. Select the text option. Delete Run
macro and type Next Subject and click Next

13 Type in Exam Results button as the button name

If your Form
does not look
like this one I
would suggest
you check your
Relationships
and ensure
that all tables
are related to
other tables,
as they should
be

Your Exam Results Form should now look like this

Test the edited form by entering Summer 2003 as the exam period and Communications as the
Subject Title. The form should display 20 records.
Click the Next Subject button. Enter Summer 2003 and Programming. The form should display 5
records.
Close the form without adding any results yet

EDIT A MACRO
We want the form to fill the entire screen when we run it.
Open the Macro "Next set of Results" in Design view
In the line below OpenForm in the Action column select Maximize
Save and Close the Macro
Exam Management System Database

Page 13

Una Dooney

COMMAND BUTTONS
These are buttons that are linked to built-in commands that execute when the button is pressed (A
bit like a Macro but one that is already built in to Access)
Once you draw a Command button on a Form the wizard will bring you through the steps you need
and write the code in the background
Open the Enter Exam Results Form and below the Next Subject button draw a command button
Select Form Operations/Close Form/Next
Select Text option and replace Close Form with Exit. Click Next
Type Close Exam Results button as the name of the button and Click Finish
View the properties of the button and set the Tab Stop to No
Adjust the width and other properties of the Command button until you are satisfied. Save the
changes to your form

ENTER EXAM RESULTS


Open the Enter Exam Results form and enter the exam results that you see in the tables below in the
Exam Results file that you will find on S or from the file you will find on my website
HINT: To speed up entering the results because many of the dates are the same when
you enter a date for an Exam in the first record, Select it, Copy it and then Paste it
into each record as you add the exam results.
When you are finished entering exam results for a particular subject click on Next Subject
button and then enter the subject title and continue entering the results until you have all
the results entered for all subjects.
Paula King did not sit the E-Commerce exam so no result is entered
Click Exit when you are finished entering results

CREATE A QUERY TO FIND RESULTS BY SUBJECT


Create a new query in Design View

Add Student, Exam and Subject tables

Add Firstname, Surname and Course from the Student table

Add Exam Period, Exam Date and Result from the Exam table

Add Subject Title from the Subject table

Add parameters to the query so that it will ask for the Exam Period and the Subject
Title when it is run (We only want to see results for a single subject for a particular
exam period)

Enter conditions that only records where the Exam Date and Results fields are filled in
are displayed

Save the query as Find Results by Subject

CREATE REPORT ON RESULTS BY SUBJECT


Create a report based on the Find Results by Subject query that will group students by their result
ie Distinction, Merit etc (see example shown)
1 Use all fields except for Exam Date
2 Group by Result
3 The Title for the report is Results
4 Save the report as Results by Subject
5 Modify the report as follows:
(i) Replace the existing Report Heading (title) with one that automatically shows the Subject
for which results are being displayed

Exam Management System Database

Page 14

Una Dooney

(ii) Move the Exam Period control to the Report Header section under the title (the subject
name)
(iii) Delete all labels etc in the Page Header section
(iv) Add a function that will show the number of results in each category ie No of Distinctions,
No of Merits etc
(v) Continue to modify the report until you get one that looks like the extract shown here
6 This extract from the report that shows student results for Web Authoring exam for Christmas
2003 with the layout you are required to use and the count showing the number of results at
each level

7 Try out the report with different subjects to ensure that it is working properly

CREATE A REPORT TO ANALYSE EXAM RESULTS


Create a report that will show an analysis of exam results. It will show the number of Distinctions,
Merits, Passes and Fails for all subjects examined and will group them by subject. (see report extract
below)
1 Firstly we need to create a query to extract this information and then base the report on it.
2 The query uses Exam and Subject tables. From Exam use Exam Period and Result. From
Subject add Subject Title
3 Add a parameter so that when it runs you will be asked for an Exam Period (remember there
are just 2 exam periods - Summer 2003 and Christmas 2003)
4 Enter a condition that only those records where the Result field contains data are shown
5 Save as Find results for a specific period
6 Create a new report based on this query.
7 Add all fields
8 Group by Subject Title and then by Result fields
9 Report title is Exam Results Analysis
10 Modify the report as follows:
(i) Move Exam Period from the Detail section to the Report Header section
(ii) Add a count function to the Result Header to count number of results per grade
(iii) Add a count function to the Subject Title footer to count the number of results per
subject

Exam Management System Database

Page 15

Una Dooney

See extract from this report below when the Exam Period Christmas 2003 was entered

REPORT ON RESULTS OF CURRENT STUDENTS


We will now create a Report on the Exam Results of all our Current Students
1
2
3
4
5
6

Do a query to find results of current students


Use Student, Exam and Subject tables
Use from Student table - Student Code, Firstname, Surname, Course and Finish Date
From Exam table use Result
From Subject table use Subject Title
Add conditions to the query to only find records where data has been entered in Results field
and the Finish Date field is empty
7 Save as Results of Current Students
8 Create a Report based on this query
9 Add all fields except Finish Date
10 Group by Course and then by Student Code
11 The title is Results by Student
12 Save the report as Results by Student
13 Add a function below the report title to show today's date
14 Add a formula to calculate the total number of exam results for each course ie The number of
exams taken in Computer Programming was 20
15 Suggested layout and format is shown here.

Exam Management System Database

Page 16

Una Dooney

REPORT ON INDIVIDUAL STUDENT PERFORMANCE


This report will show the performance of an individual student
We need a query to put the data together for us first
1 Design the query using Student, Exam and Subject tables
2 From Student add Student Code, First name, Surname, Course, Finish Date and Certificate
fields
3 From Exam add Result,
4 From Subject add Subject Title, Core Module, vocational Module and Elective Module
5 Add conditions so that if finds records of exams where the result was pass, merit, or distinction
and where there is no Finish Date entered
6 Save the query as Certification Query
7 Create a Report linked to the Certification Query including all fields except for Core Module,
Vocational Module, Elective Module, Certificate and Finish Date
8 Group report by Student Code
9 The report title is Student Certificates
10 Move the name and Course fields from Detail to Student Code Header sections
11 In Student Code Header delete the Student Code field
12 Add a function to the Student Code Header that displays todays date
13 Delete labels and lines contained in the report header
Exam Management System Database

Page 17

Una Dooney

14 Reduce the height of the report header to 0 cm


15 View the properties of the Student Code Header. Set the Force New Page property Before
Section. This means that details relating to each student will be on a separate page
If you are having difficulty producing this report remember that the only sections that are used are
the Student Code Header section, the Detail section and the Page Footer section if you wish. The
Report Header and Page Header sections are empty and their heights have been reduced to 0

Above you see one of the Certificates that the report produces. It will produce each certificate on a
separate page and these can be printed to send to students.
From what you have been doing for the past while you will you will have noticed that many reports
are built on the results of queries, so it is very important that you get the tables and fields right for
your query before you attempt doing a report. The question is what do you want the report to show
and it goes from there!

STUDENT LETTERS
Prepare letters to students giving their examination result as per separate handout on Mail Merge

Exam Management System Database

Page 18

Una Dooney

THE USER INTERFACE USING SWITCHBOARDS


We will now design a special user-interface for our database using the Switchboard facility available
in Access. We want the database to open with a menu of options from which user can choose.
You decide on how you want to have the data in your database accessed using the switchboard. The
pages shown here are a suggestion and we will develop them now

Fig 1

Above you see the Main Menu (the switchboard shown in Fig 1) that we will create. This is what the
user will see when they open the database
However, we are going to develop a multi-page switchboard and we need to create the Data Entry
(Fig 2) and View Reports (Fig 3) switchboards before we can create the links from our Main Menu
(which is the main or default switchboard)
When we click on the Data Entry button we get this screen Fig 2. When we click on View Reports we
will get Fig 3 that you will see later in this document

Fig 2

All we are doing here is putting a user-friendly interface on the database to make it easier for the
user to use and manage

Exam Management System Database

Page 19

Una Dooney

CREATE A SWITCHBOARD
1
2
3
4
5
6
7

Go to Tools/Database Utilities/Switchboard Manager


You will get a message saying Access cannot find a switchboard and if you would like to create
one. Say yes
In the Switchboard Manager dialog you will see Main Switchboard (Default)
You can click Edit and change the name of the Main Switchboard to Main Menu
Click Close to go back to Switchboard Manager
Click on New to create a new switchboard page
In the Create New dialog box type in Data Entry as the name of the page and Click OK to go back
to Switchboard Manager

In the Switchboard Manager dialog select the Data Entry page and click Edit

9 In next screen click New


10 You will get the Edit Switchboard Item dialog box

11 In the Text box type in the label you want to appear on the screen - I have used Register new
Student
12 In the Command line select Open Form in Add Mode
13 In the Form line select the Student Registration Form
(i)
Open Form in Add Mode allows you to enter data in your database using the chosen form
(ii)
Each item opens a different Form depending on the one you choose in the Form line
14 This will add the Item Register new Students to the Data Entry switchboard as you see here

15 Click New again and add the next item in the list (see the items in Fig 2)
Exam Management System Database

Page 20

Una Dooney

16 Add the Enter Exam Results item in the same way


17 We need to be able to get back to the Main Menu, so the last item you add to the switchboard is
shown below - Go to Main Menu
18 The name that will appear on the switchboard command is Main Menu
19 In the Command line we select Go to Switchboard
20 In the Switchboard line we select the Switchboard we want to go to in this case Main Menu

21 Before we leave the Switchboard Manager we need to put a link from the Main Menu switchboard
to the Data Entry switchboard otherwise we will never be able to access it
22 In the Switchboard Manager page click on Main Menu and then Edit

23 Click New and add the 2 entries you see above to the Main Menu
(i)
The Data Entry link should bring us to the Data Entry switchboard
(ii)
The Exit item should allow us to exit out database Close Application
(iii)
Be careful to use the correct operations in the Command line for each item
24 When you are finished adding all these items you will see a Switchboard Form has been added
automatically to the forms section of your database

25 Double-click on the Switchboard form to open it


26 You should see something like this, which is the Main Menu switchboard you just created
Exam Management System Database

Page 21

Una Dooney

27 Click on the Data Entry button to see what happens. You should get the menu that looks like
Fig 2
Use the Switchboard Manager to add another switchboard page with the name View Reports (Edit the
Main Menu switchboard and add a New item)
Add the following items to the View Reports switchboard, as before, not forgetting to make the
navigation possible to and from the Main Menu and the View Reports screen

Fig 3

We have just one more job left to complete our Switchboard operation. We want the switchboard to
be what is seen when somebody opens the database. For this we need to create an Autoexec macro.
This will run automatically each time the database is opened

Exam Management System Database

Page 22

Una Dooney

AUTOEXEC MACRO
1
2
3
4
5
6
7
8

Select Macros
Click New (You should now be in Design View)
Select OpenForm in the first line of the action column
Select Switchboard as the form name in the Properties area
For View select Form
Select Maximize command in the second line of the action column. You do not have to set any
other Properties here
Save the macro as autoexec
Test this by closing the database and opening it again. The database should open with the Main
Menu displayed and taking up the whole screen

A QUERY BASED ON ANOTHER QUERY


Create a new query linked to the Certification query. To do this use the Query Wizard. The purpose
of this is to find the students who have completed their course so that we can award their
certificates
1. Click on Queries/New/Simple Query Wizard

2. Select the Certification Query as the basis for the new query
3. Add Student Code, Firstname, Surname, Course, Core Module, Vocational Module, Elective
Module and Certificate to the query design grid
4.
5.
6.
7.

Click on Totals button in the toolbar


. This puts a Totals row in the design grid area
Select Sum in the totals row for Core Module, Vocational Module and Elective Module fields
Run the query and you should see 20 records
Go back to Design and enter conditions in the design grid so that the query finds only those
students who have completed 2 core modules, 5 or more vocational modules and 1 elective
module. This will give us a list of the students who have completed the course requirements
and to whom we will be awarding certificates
8. Run the query again and you should get 9 records
9. Print the results of the query. The reason for this is just to make it easier to enter the
results in the form later!
10. Save the query as Certification Query part 2

STUDENT CERTIFICATION FORM


1.
2.
3.
4.

Create a new form linked to the Student table


Add Student Code, Firstname, Surname and Certificate fields to the Form
Modify as you see below
Save as Award Certificate

Exam Management System Database

Page 23

Una Dooney

We use the Student table to create the form above even though the query Certification Query part 2
had all the required fields. We cannot base a form on the results of a query that has a Totals row
added!

EDIT SWITCHBOARD
1.
2.
3.
4.
5.

Go to the Data Entry switchboard page and add a new item Award Certificates
Move it up so that it is above the Go to Main Menu item
Create the item so that it allows us to edit the Award Certificates Form
Save your database and close it.
Open the database again and, using the table you printed with the 9 student names who are
to be awarded Certificates, use the Award Certificates button on the switchboard and enter
the data (tick Certificate for the 9 students) who have completed the course. The
Certificate box for the students who have not qualified are left blank
6. Save database
7. Look at the Student table. You should see the Certificate box ticked for the 9 students

CREATE AN UPDATE QUERY


So far we have only conducted Select queries ie queries that select a sub-set of records from our
database that match certain criteria and display the records. We will now do a different type of
query an Update query. This finds records and then updates them automatically by entering data in
one or more fields. As you can imagine, this is a very fast method of updating a database, especially
if there are a lot of records to update.
1
2
3
4

Create a new query based on the Student table


Add Student Code, Firstname, Surname, Start Date, Certificate and Finish Date fields
Add a condition to the query so that it only finds records of students who have a been awarded a
certificate
Test the query by running it and you should get the 9 students to whom you have awarded
certificates

Go back to Design view and from the menus select Query/Update Query, or click on
in the
toolbar and then select Update query
6 A new Update to row appears in the query design grid
7 Enter =date() in the update-to row of the Finish Date field
8 Save the query as Update finish date
9 Run the query. You will be prompted that 'you are about to update 9 rows'. Click on Yes to
update the records
10 After running the query todays date will have been entered in the Finish Date field for the 9
students in question. Open the datasheet view of the Students table to see if the relevant
students have a date in the Finish Date field. They should have!

Exam Management System Database

Page 24

Una Dooney

Das könnte Ihnen auch gefallen