0% found this document useful (0 votes)
36 views

Unit 7 - Using Forms To Update and Modify Data in A Database

Uploaded by

Anthonette
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Unit 7 - Using Forms To Update and Modify Data in A Database

Uploaded by

Anthonette
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

U U N IT

7
Using Forms to Update and
Modify Data within a Database

Source:http://tinyurl.com/zsm25z6

Overview

In Unit 6, we discussed extracting information from a relational database using


Queries. This unit continues to explore the use of the objects with a database; this time
we will review Forms. Forms provide an easy-to-use interface for working with data
within a database. Forms also allow you to control how other users interact with the
data in the database which helps to maintain consistency within the database while
ensuring that the data is entered accurately. In this unit, you will learn how to create
forms and also modify and further design the forms to enhance usability. You will also
explore the use of subforms and the addition of functional elements, such as command
buttons.

222  MGMT2005 Computer Applications for Business – UNIT 7


Unit 7 Learning Objectives

By the end of this unit you will be able to:

1. Create simple forms to address a given business need;

2. Enter and manipulate data using forms;

3. Apply good design techniques when developing forms.

4. Implement basic data validation mechanisms within forms to prevent errors;

5. Describe the various form controls that may be used to enhance a form;

6. Create a form with a subform;

7. Add form controls appropriately to enhance a form’s user interface.

This unit comprises four sessions as follows:

Session 7.1: Creating a form to allow for updating of records in a database

Session 7.2: Modifying a form design to enhance data collection and the user
interface

Session 7.3: Creating a form with a Subform

Session 7.4: Creating controls on forms to enhance user interface

Readings and Resources

Required Textbook

Miller, Lisa. (2008). MIS Cases: Decision making with application software (3rd
Edition). Pearson Education Inc, Upper Saddle River, New Jersey

Highly Recommended Resources

Benson, D. V., & Davis, K. (2008). Business information management. Retrieved


from http://tinyurl.com/gpme8v9

Benson, D. V., & Davis, K. (2013). Business information management: Exercises –


Solutions to hands on exercises. Retrieved from http://tinyurl.com/j4ebas7

Bourgeois, D. (2014). Information systems for business and beyond. Retrieved


from http://open.umn.edu/opentextbooks/BookDetail.aspx?bookId=189

GCF Global. (2016). Excel Access. GCFLearnFree.org. Retrieved from


http://www.gcflearnfree.org/office2013/access2013

MGMT2005 Computer Applications for Business – UNIT 7  223


Gallaugher, J. (2015). Information systems: A manager’s guide to harnessing
technology. Retrieved from http://open.umn.edu/opentextbooks/BookDetail.
aspx?bookId=16

Additional Resources

Donalds, C. and Henry, J. (2011). Solving managerial problems with spreadsheets


and databases.

224  MGMT2005 Computer Applications for Business – UNIT 7


SSession 7.1

Creating a Form to Allow for Updating of


Records in a Database

Introduction
In Unit 5, we reviewed creating tables and adding and editing data within tables.
We, however, used the datasheet view to add and edit data within the tables. Access
allows for the use of more user-friendly objects to allow for modifying data, these
objects are known as forms.

Forms in Access are like display cases in stores that make it easier to view or get the
items that you want. Since forms are objects through which you or other users can add,
edit, or display the data stored in your Access desktop database, the design of your
form is important. If your Access desktop database is going to be used by multiple
users, well-designed forms are essential for efficiency and data entry accuracy. In this
session, we will review how to create a form in an Access database.

About Forms
A Form is an Access object that allows the end user to add, edit and display data in
the database. In most databases, forms are usually provided for end users to use when
interacting with the database as they make it easier to view, add, edit and delete data
within the database. Forms may be built using tables or queries within the database,
but are commonly used with tables. Given this, it is therefore important to ensure that
forms are appropriately designed to enhance user-friendliness.

Command buttons and other functionalities may be added to a form to make it easier
to perform operations within the database.

Creating Forms
There are several ways to create a form in an Access database. This unit will focus
on creating forms using the Form Wizard and creating forms directly from tables or
queries. Once a form has been created, you can modify the form by adding additional
fields and design controls to enhance the forms.

MGMT2005 Computer Applications for Business – UNIT 7  225


We will now explore how to create forms within a database. But first, we will, in
Learning Activity 7.1, create a database containing three tables which we will later use
to create forms.

ACTIVITY 7.1
Create a Database (30 minutes)

Instructions:

1. Open a new database.

2. Save the database as StudentRegDB.

3. Using the information contained in Figure 7.1 below, Create the Student
Table.

Figure 7.1: Student Table

4. Using the information contained in Figure 7.2 below, Create the Course
Table.

Figure 7.2: Student Table

226  MGMT2005 Computer Applications for Business – UNIT 7


ACTIVITY 7.1 Cont’d
5. Using the information contained in Figure 7.3 below, Create the
Registration Table.

Figure 7.3: Registration Table

6. Create the relationship between the tables as detailed in Figure 7.4


below.

Figure 7.4: Registration Table

7. Close the relationship screen.

Creating Forms Using the Form Wizard


Now that we have a database to work with, we will now explore creating forms.

MGMT2005 Computer Applications for Business – UNIT 7  227


The Form Wizard may be used to quickly and easily create forms. This option also
allows you to be selective about the fields that should appear on the form.

To create a form from a table (or query) using the Form Wizard:

1. Open the StudentRegDB database created in Learning Activity 7.1 above.

2. Select the Create tab.

3. In the Forms group, click Form Wizard.

Figure 7.5: Form Wizard Icon

4. On the first page of the wizard, in the Tables/Queries drop-down list, select a
table or query. We will select the Student table first.

Figure 7.6: Form Wizard: Select Fields

5. Double-click the fields that you want to include from this table. For this
demonstration, we want to include all the fields in the Student table. The single
arrow will allow you to add one field at a time, while the double arrow will allow
you to add all fields in the selected Table (Query).

6. Click Next

7. We will allow the layout to remain on the default layout, Columnar.

228  MGMT2005 Computer Applications for Business – UNIT 7


Figure 7.7: Form Wizard: Layout

8. Click Next.

9. Enter a Title for the Form. By default, Access will insert the name of the Table (or
query) on which the form was based.

10. You can now decide whether to Open the form in Form view, so that you can view
or enter information, or you may open the form in Design view, where you can
modify the form’s design.

Figure 7.8: Form Wizard: Layout

MGMT2005 Computer Applications for Business – UNIT 7  229


Figure 7.9: Student Form (Design View)

11. Click Finish.

12. The form will open in Form View and will display the first record in the Student
Table.

Figure 7.10: Student Form (Form View)

230  MGMT2005 Computer Applications for Business – UNIT 7


Parts of a Form

Figure 7.11: Parts of a Form (Design View)

• The Form Header contains general information about the form; for example, if
you were working in a company database, the name of the company the form is
associated with and the name of the form.

• The Detail Section usually contains most controls including the text boxes linked
to the table or query and the appropriate labels. Labels and text boxes and other
controls will be discussed in Session 7.4.

• The Form Footer often contains general information for the form such as contact
information.

In Learning Activity 7.2 you will view a presentation which further explores creating
forms within a database.

MGMT2005 Computer Applications for Business – UNIT 7  231


ACTIVITY 7.2
Creating Forms in an Access Database (30 minutes)

Instructions:

Watch the VIDEO entitled “Creating Forms” located on the webpage:

uu https://www.youtube.com/watch?v=3WI8D2g2wN8 - Approx. 4 mins.

Use this video to explore and learn more about creating forms within an
Access database.

In Learning Activity 7.3 you will further explore creating forms within a database
using the Form Wizard.

ACTIVITY 7.3
Creating Forms in an Access Database using Form Wizard (15
minutes)

Instructions:

Open the StudentRegDB database and using the Form Wizard, create
a form based on the Course Table.

The Form Wizard can create a variety of results depending on the options that you
select. As practice, it is recommended that you run the Form Wizard several times,
experimenting with different options each time, until you get the desired results.

Creating Forms Directly From a Table or Query


It is very easy to create a form directly from an existing table.

To create a form from a table (or query) in your database:

1. Open the database.

2. Identify the existing table (or query) in the Navigation Pane that contains the data
required for the form.

232  MGMT2005 Computer Applications for Business – UNIT 7


Figure 7.12: Navigation Pane

3. Left-click (once) on the table (or query)

4. On the Create tab, click Form.

5. Access will then create a form containing all the fields in the Table (or query)
selected and displays the form in Layout view. You can now make design changes
as desired.

In Learning Activity 7.4 you will further explore creating a form directly from a Table
within a database.

ACTIVITY 7.4
Creating Forms in an Access Database using Form Wizard (15
minutes)

Instructions:

Open the StudentRegDB database and using the steps outlined above,
create a form based on the Registration Table. (Do not use the Form
Wizard).

Manipulating Records in a Database Using Forms


You may also use forms to enter data in a table. It gives you a more user-friendly
interface for manipulating data within one or more tables. In each form, you will have
the option to see one record at a time. You can use a form to:

MGMT2005 Computer Applications for Business – UNIT 7  233


• Search for records
• Edit records
• Add records
• Delete records.
Some fields may also use a validation tool that will control data entry. A combo box is
one such tool. This will be discussed further in Session 7.4. These validation controls
will help to maintain consistency within your table and database.

In Learning Activity 7.5 you will view a presentation which further explores working
with forms to enter, edit and delete records within a database.

ACTIVITY 7.5
Working with Forms in an Access Database (30 minutes)

Instructions:

Watch the VIDEO entitled “Working with Forms” located on the webpage:

uu https://www.youtube.com/watch?v=Et1t6MABFMo -Approx. 4:54 mins.


Use this video to explore and learn more about working with forms within
an Access database.

Session 7.1 Summary

In this session we reviewed creating and using forms to collect and store data in a
database. Now that we have our forms, in the next session, we will look at enhancing
our forms’ user interface.

234  MGMT2005 Computer Applications for Business – UNIT 7


SSession 7.2

Modifying a Form Design to Enhance Data


Collection and the User Interface

Introduction
After creating your form, it may become necessary to modify the form design in order
to enhance the user interface and make it easier to facilitate data collection. Most
designs to a form will take place in the Design View. In this session we will review the
most frequently used methods that may be adopted to further enhance a form’s design
and how to apply good design techniques based on best practices when developing
forms.

Design View
The Design View provides a detailed view of the structure of a form. From this view,
you will see the Header, Detail, and Footer sections of the form. The form is not active
when it is shown in Design View; therefore, you will not be able to see the underlying
data while in Design View.

Modify a Form
There are several tasks that you may want to effect to enhance the design of your form.
These you would perform in the Design View of the form (as opposed to Form View
and Layout View).These include:

• Adding and editing controls on your form (this will be discussed further in Session
7.4).

• Resizing sections on the form, such as the Form Header or the Detail section.
• Adding details to the section of the form.
• Changing certain form properties that cannot be changed in Layout view.
Change the Size of a Field:
1. Open the form in Design View.

MGMT2005 Computer Applications for Business – UNIT 7  235


2. Hang the mouse at the side of a control until the two-sided arrow (horizontal or
vertical) appears.

Figure 7.13: Arrows used to resize controls

3. To change the width of the control: Click and hold on to a side of the control
(preferably the right side) and drag to change the width of the control.

4. To change the height of the control: Click and hold on to the top or bottom of a
control and drag to change the height of a control.

Move a Control:
1. Open the form in Design View.

2. Hang the mouse at the side of a control until the four-sided arrow appears.

Figure 7.14: Arrow used to move controls

3. Click and hold on to the control (preferably the right side) and drag and move the
control in the desired direction.

236  MGMT2005 Computer Applications for Business – UNIT 7


Move and Resize Controls Independently
By default, when you create a new form by using one of the form tools on the Create
tab, Access will place the text boxes and other controls in guides called layouts.
A layout, indicated by an orange grid around the controls, helps to align controls
horizontally and vertically to give the form a uniform appearance. This is shown in
Layout View of the form.

While layouts can help to quickly modify a form, in some cases, you may need to
move and size the controls independently. To do this, you would need to remove
controls from layouts, after which you can move and resize them without affecting
other controls.

To do this:

1. Open the Form.

2. Switch to Design View.

3. Select the controls on the form that should be removed from the layout.

4. Select the Arrange tab.

5. In the Table group, click Remove Layout icon.

6. Access removes the selected controls from the layout.

Figure 7.15: Remove Layout

Good Form Design Techniques


When designing a form, you want to ensure that you are exercising good form design
techniques according to best practices and the requirements of the organisation for
which the database is being developed. Remember that the form is usually the object
that the user will mostly interface with.

MGMT2005 Computer Applications for Business – UNIT 7  237


Below are some basic design techniques that you should endeavour to follow when
completing your forms:

1. Verify that the form is linked to the correct table or query.

2. Ensure that there is accurate spelling on the form.

3. Provide directions on the form, where necessary, so that the user knows how to
use the form.

4. Ensure that the form has an appropriate layout that is easy for the user to understand
and to navigate.

5. Resize controls to enhance the user interface.

6. Use appropriate font type and font colour.

7. Ensure that the form has a form header.

8. Ensure that the buttons work on action.

9. Use the tools and features available to assist with data validation.

In Learning Activity 7.6 you can view the presentation to further explore formatting
forms within a database.

ACTIVITY 7.6
Working with Forms in an Access Database (30 minutes)

Instructions:

Watch the VIDEO entitled “Formatting Forms” located on the webpage:

uu https://youtu.be/DX0vI__-Bgs
Use this video to explore and learn more about working with and
formatting forms within an Access database.

Session 7.2 Summary

In this session we explored ways in which we can modify a form to enhance its user
interface and apply good design techniques. In the next session, we will review the
use of subforms.

238  MGMT2005 Computer Applications for Business – UNIT 7


SSession 7.3

Creating a Form with a Subform

Introduction
Recall that with relational databases, the data are stored in separate tables within
the database. In session 7.1, we learnt how to create a form from one table. It may
become necessary to create a form from multiple tables or queries so that data may be
viewed from these multiple sources. This may be accomplished using a subform. In
this session we will learn how to create a form with a subform.

Subforms
A subform is a form within another form. The primary form is called the main form. A
combination of a form and a subform is sometimes referred to as a hierarchical form
or a parent/child form.

Subforms are especially useful when you want to show data from tables or queries
that have a one-to-many relationship. For example, using our StuRegDB database,
you may want to see a student’s record from the Student table and additional data
about that student from the Course table, both at the same time. The data in the
Student table is the “one” side of the relationship while the data in the Course table
is the “many” side of the relationship (each student can be registered for more than
one course).

Create a Form with a Subform by Using the Form Wizard


We will now create a form with a subform combination by using the Form Wizard.
The use of the wizard is the quickest method to create a form and a subform. It is
also possible to first create both forms and then combine them to form a form and a
subform.

In our example, we will create a Student form that displays the students and the
course(s) they are registered for in a subform.

To create a form with a subform, complete the following:

1. Open the StuRegDB database.

MGMT2005 Computer Applications for Business – UNIT 7  239


2. Select the Create tab.

3. In the Forms group, click Form Wizard.

4. On the first page of the wizard, in the Tables/Queries drop-down list, select a
table or query. We will select the Student table first.

5. Double-click the fields that you want to include from this table. We want to include
all the fields in the Student table.

6. Then, (on the same page of the wizard), in the same Tables/Queries drop-down
list, select another table or query from the list. This time we will select the Course
table.

Figure 7.16: Form Wizard (Add Fields)

7. Double-click the fields that you want to include from this table. We want to include
all the fields in the Course table except the Student ID (this field was already
included from the Student table).

8. Click Next

9. The wizard will then ask: How do you want to view your data? - that is, by which
table. We want to view by the Student table, select Student.

240  MGMT2005 Computer Applications for Business – UNIT 7


FOOD FOR THOUGHT
The wizard posed the question: “How do you want to view your data?”
because it was able to detect a one-to-many relationship between the
Student and Course tables. If there was no such relationship, the wizard
would not be able to create a subform with the main form. If this ever
happens, close the form wizard and return to the relationships screen in
the database and create the appropriate relationship between the tables
being used.

10. Click Next.

11. Select Form with subform(s) (this is located at the bottom of the wizard page).

Figure 7.17: Form with subform

12. Click Next.

13. Do not change the layout, allow it to remain on the default layout – Datasheet.

14. Click Next.

15. Type the titles that you want for the forms. Access will name the form based on the
titles typed, and label the subform based on the title that you type for the subform.
We will title our Form: Student Form and the Subform: Course Form.

MGMT2005 Computer Applications for Business – UNIT 7  241


16. Select Open the form in Form View, so that you can view or enter information You
may also open the form in Design view, here you can modify the form’s design

17. Click Finish.

18. Access then creates two forms - one for the main form that contains the subform
control, and one for the subform itself. The subform control is the control that
embeds a form into a form. The main form is linked to the Student table and the
subform is linked to the Course table.

Figure 7.18: Student Form with Course Subform

Create a Form with a Subform by Adding One or More Subforms to


an existing form by using the Subform Wizard
You can also create a subform by adding one or more subforms to an existing form.
That is, if you already have a form and would like to add another form to the form, a
subform, you can do so by editing the form and using the Subform Wizard.

To add a subform to an existing form, you should:

242  MGMT2005 Computer Applications for Business – UNIT 7


1. Open the StuRegDB database.

2. Identify the existing form in the Navigation Pane.

3. Right-click on the form.

4. Click Design View.

5. On the Design tab, in the Controls group, click the down-arrow to display the
Controls gallery.

6. On the Design tab, in the Controls gallery, click the Subform/Subreport button.

Figure 7.19: Student Form with Course Subform

7. Click the section on the form where you want to place the subform.

8. The Subform Wizard will open. Follow the directions in the wizard (similar to the
steps carried out above when creating a subform).

9. When you click Finish, Access will add a subform control to your form.

In Learning Activity 7.7 you will practice creating a form and a subform.

ACTIVITY 7.7
Create a Form and a Subform (30 minutes)

Instructions:

1. Using the StuRegDB database, create a Student Form with the Registration
Form as a subform. You are free to use either of the two methods outlined
above.

2. Save your database and upload your database to the appropriate forum
in the Learning Exchange.

MGMT2005 Computer Applications for Business – UNIT 7  243


Session 7.3 Summary

In this session, we learnt how to create a form from a table whose records are linked
to another table, thereby creating a subform. Subforms allow for the viewing of
data across multiple tables. In the next session, we will learn how to create the most
commonly used controls on forms so as to enhance the user interface.

244  MGMT2005 Computer Applications for Business – UNIT 7


SSession 7.4

Creating Controls on Forms to Enhance


User Interface

Introduction
Controls help to set restrictions on the fields in database forms. This helps to better
control how the data is entered into your database via the form and helps to maintain
consistency within the database, for example, combo boxes. A combo box is a control.
Controls may also be used to enhance the form so as to make it more user-friendly
and easier for the user to navigate, for example, control buttons. A control button is a
control. In this session we will learn how to create the most commonly used controls
on forms so as to enhance the user interface.

Controls
There are several different types of controls that may be used on forms. The available
controls may be found on the Design tab in the Controls grouping. We will explore
the most frequently used controls, such as Text Box, Label, Button and Combo Box. In
session 7.3 you explored the subform control.

Figure 7.20: Deign Controls

Text Box
A text box is represented by a rectangular box which allows you to view, type, or edit
text or data that is usually bound to a field from a table or a query. For example, when
you create a form, the rectangular boxes that contain the data from the fields are the
text boxes. When you add a text box a label is also created along with the text box.

To create a Text Box:

MGMT2005 Computer Applications for Business – UNIT 7  245


1. Open the Form, we will use the Registration Form created in Learning Activity 7.4
above

2. Switch to the Design view.

3. On the Design tab, go to the Controls group.

4. Select the Text Box command, which looks like this:

5. Select the desired location on the form where you would like to place the Text Box
and click (using the left click).

6. The Text Box will be placed on the form. You may now bound the Text Box to a
field in a table or a query. A Label control has also been provided so you may edit
the text in the Label as appropriate.

Figure 7.21: Text Box Control

Label
A label is used to add descriptors to your form. For example, you would use a label
to identify the contents of a text box, or to display descriptive text or instructions to
the user. These include, titles, captions, and pictures. When you create a form, Access
automatically adds labels beside each text box. Recall that the text box will be bound
to a field; the labels would have a similar name as the text box. You can always edit
the names (text) in the label.

To create a Label:

1. Open the StuRegDB database.

2. Open the Registration Form.

3. Switch to the Design view.

246  MGMT2005 Computer Applications for Business – UNIT 7


4. On the Design tab, go to the Controls group.

5. Select the Label command, which looks like this:

6. Select the desired location on the form where you would like to place the Label
and click (using the left click) and hold down the left click and drag your hand
across as far as you want the label to extend.

7. The Label will be placed on the form. The cursor will be blinking in the Label; you
may now enter the text in the Label as appropriate. The words ‘New Label’ have
been entered in the example below.

Figure 7.22: Label Control

Button
A button is a control that performs an action when a user clicks it. When the button
is selected, Access runs what is called a macro which will execute the action that has
been set for that particular button. There are several actions that can be associated
with a button. Some of the commonly used actions include, add record, delete record,
find record and, open form.

To create a Button:

1. Open the Form, we will use the Registration Form created in Learning Activity 7.4
above.

2. Switch to the Design view.

3. On the Design tab, go to the Controls group.

4. Select the Button command, which looks like this:

MGMT2005 Computer Applications for Business – UNIT 7  247


5. Select the desired location on the form where you would like to place the Button
and click (using the left click) on the form.

6. The Command Button Wizard box will appear. Here, we need to select the action
that should occur when the button is pressed on the form. We want to create a
button which may be used to Add records to the Registration Table.

7. Under Categories – select Record Operations.

8. Under Actions – select Add New Record.

Figure 7.23: Command Button Wizard (Select Action)

9. Select Next

10. We will now select a picture or text to be displayed on the button. For our example,
we will display text.

11. Select the Text option and type Add Registration.

248  MGMT2005 Computer Applications for Business – UNIT 7


Figure 7.24: Command Button Wizard (Select Display)

12. Select Next.

13. You can choose to name the button or use the default name provided by Access.
This is different from the name that will appear on the front of the button in the
form. In this example, we will name the button RegButton.

Figure 7.25: Command Button Wizard (Name the Button)

MGMT2005 Computer Applications for Business – UNIT 7  249


14. Select Finish.

15. The Button will be placed on the form.

Figure 7.26: Add Registration Button (in Design View)

16. To see the button in action, you will need to return to Form View and then select
the button. Once the button is selected, you will get the option to enter a new
record in the Registration Table.

Figure 7.27: Add Registration Button (in Form View)

250  MGMT2005 Computer Applications for Business – UNIT 7


Combo box
A combo box is a control that may be used on a form to replace a field. It provides a
drop-down list of options for the user. Combo boxes limit the data that users can enter
by forcing them to select only the options specified in the combo box.

A combo box is useful where there are fields that have a set number of possible valid
responses. For example, you may choose to use a combo box to ensure that the user
enters ‘male’ or ‘female’ to represent gender or to ensure that the user only selects
items that already exist in the database.

We will now create a combo box on the Registration Form to replace the text box that
is now on the form and is bound to the Course Field from the Course Table. Once we
replace the text box with a combo box, the user will be able to select the appropriate
course from the drop down list that will be provided once the combo box is selected.

To create a combo box:

1. Open the StuRegDB database.

2. Open the Registration Form.

3. Switch to the Design view.

4. On the Design tab, go to the Controls group.

5. Select the Combo Box command, which looks like this:

6. Select the desired location on the form where you would like to place the Combo
Box and click (using the left click) on the form.

7. The Combo Box Wizard box will appear. We need to determine where the combo
box will obtain its values from. Since we are replacing the Course text box that is
linked to the Course field in the Course Table, we will select that we want the
combo box to get its values from a table.

Figure 7.28: Combo Box Wizard

MGMT2005 Computer Applications for Business – UNIT 7  251


8. In the Combo Box Wizard select the option I want the combo box to get the values
from another table or query.

9. Click Next.

10. Select the table that should provide the values for the combo box. We will select
the Course Table.

11. Click Next.

12. Add both the CourseID and CourseName fields to the Selected Fields area.

13. Click Next.

14. We will sort using the CourseName field in ascending order.

15. Click Next.

16. Uncheck the Hide key column so that the CourseID field is shown.

17. Click Next.

18. Ensure that the CourseID field is highlighted as that is the field that has the values
we would like to store.

19. Click Next.

20. Select the option Store that value in this field.

21. Select the CourseID field from the drop down menu.

22. Click Next.

23. You can choose to name the label or use the default name provided by Access. In
this example, we will name the button CourseID.

24. Click Finish.

25. The Combo Box will appear on the form.

26. Since we create the Combo Box to replace an existing field, we should delete the
first field, called CourseID. Delete the one without the combo box.

27. Switch to Form view to test the Combo Box. Do this by clicking the drop-down
arrow and verify that the list contains the Course IDs. The combo box can now be
used to enter data.

252  MGMT2005 Computer Applications for Business – UNIT 7


Figure 7.29: Combo Box (Form View)

If you want to include a drop-down list with a list of options that are not available in
a table or query but you will provide these values, then you will create a combo box
and choose the second option in the Combo Box Wizard, I will type the values that I
want. This will allow you to type the choices you want to appear in the drop-down
list. Each t=choice should be entered in its own row.

Figure 7.30: Combo Box Wizard (Type the Values)

MGMT2005 Computer Applications for Business – UNIT 7  253


At this time, you can review the VIDEO at Learning Activity 7.2 entitled “Creating
Forms” located on the webpage: https://www.youtube.com/watch?v=3WI8D2g2wN8
(starting at time 1:59 in the video), as it also explored adding a combo box to a form
using the I will type the values I want option.

Use this video to explore and learn more about creating forms within an Access
database.

In Learning Activity 7.8 you will practice adding and editing records.

ACTIVITY 7.8
Creating a Combo Box (30 minutes)

Instructions:

1. Using the StuRegDB database, open the Course Form and create a
combo box on the form labelled Credits which provides the user with the
following choices:

●● 2 credits

●● 3 credits

●● 4 credits
2. Save your database and upload your database to the appropriate forum
in the Learning Exchange.

Session 7.4 Summary

In this session you learnt how to add controls to a form. This helps to enhance the user
interface of the form.

UNIT 7 SUMMARY

In this unit, we examined forms in Access and how forms can be used to view, enter,
and edit data in the tables within a database. They may also be used to manipulate
queries. We also explored ways in which the form can be enhanced to improve the
user interface and to make it more user-friendly. The use of controls on forms was also
discussed including the use of subforms and command buttons to further enhance the
user experience when interacting with the form.

254  MGMT2005 Computer Applications for Business – UNIT 7


References
Benson, D. V., & Davis, K. (2008). Business information management. Retrieved
from http://tinyurl.com/gpme8v9

Benson, D. V., & Davis, K. (2013). Business information management: Exercises –


Solutions to hands on exercises. Retrieved from http://tinyurl.com/j4ebas7

Bourgeois, D. (2014). Information systems for business and beyond. Retrieved


from http://open.umn.edu/opentextbooks/BookDetail.aspx?bookId=189

Donalds, C. and Henry, J. (2011). Solving managerial problems with spreadsheets


and databases.

Gallaugher, J. (2015). Information systems: A manager’s guide to harnessing


technology. Retrieved from http://open.umn.edu/opentextbooks/BookDetail.
aspx?bookId=16

GCF Global. (2016). Access 2013: Creating Forms. GCFLearnFree.org. Retrieved


from http://www.gcflearnfree.org/access2013/creating-forms/1/

GCF Global. (2016). Access 2013: Working with Forms. GCFLearnFree.org.


Retrieved from http://www.gcflearnfree.org/access2013/working-with-
forms/1/

Microsoft. (2016). Introduction to Forms. Retrieved from


http://tinyurl.com/zqxzxkh

Microsoft. (2016). Overview of forms. Form controls and ActiveX controls on a


worksheet. Retrieved from http://tinyurl.com/hjb2wyh

MGMT2005 Computer Applications for Business – UNIT 7  255

You might also like