How to Create a Subform from a Table in Access 2016

You can use a table to create a subform — a form within a form. The subform contains data that is relevant to the the data in the main form.

A subform is a form that is nested inside of another form. It usually contains data that is associated with the record that is currently open in the main form.

For example, you could have a form that displays an order, and a subform that displays each item within the order.

Or, you could have a form that displays a country, with a subform that displays each city within that country.

Below is a step-by-step guide to creating a form and subform from a table.

  1. Screenshot of Access with the Form button highlighted

    Create a New Form

    In the left Navigation Pane, select the table to base your form/subform on and select Form from the Ribbon (on the Create tab).

    In order for this to work, the selected table must be the "one" part of a one-to-many relationship.

    See below for more information.

  2. Screenshot of the form and subform

    The Form & Subform

    The form and its subform are instantly created and displayed in Layout View.

    The subform appears in Datasheet View under the other fields of the main form.

A Closer look at the Subform

Let's see how the subform appears in the various views, as well as how it gets its data.

How it Works

Creating a subform like this only works if that table is part of a relationship. Access sees that there's a relationship, so it helpfully creates the subform automatically.

More specifically, the table must be the "one" part of a one-to-many relationship.

If you create a form from the "many" table, you won't get a subform. The form will be a simple form based on the selected table.

If you create a form from a table that is not part of a relationship, there's no need for a subform (as there's no related data in another table).

A subform is sometimes referred to as a one-to-many form, as it will display the "many" part of a one-to-many relationship (with the parent form displaying the "one" part).

Subforms are also often referred to as subdatasheets.

A form/subform combination is sometimes referred to as a hierarchical form, a master/detail form, or a parent/child form.

Subforms vs... Subforms

If you create a subform using the SubForm Wizard, you will probably end up with two forms; the main form, and the subform. Both forms will be saved under the Forms node in the Navigation Pane.

When you create a subform from a table (like in the above example), you won't get the extra form. This is because the subform/subreport control is displaying data directly from the table.

So technically, it could be argued whether this is actually a subform, or just a subdatasheet. Either way, it displays the same result for the user.

If you don't want to display all fields from the table, you could use a query as the source object, or create a subform using the SubForm Wizard.

Don't need a Subform?

As mentioned, Access is trying to be helpful when it creates the subform automatically for you.

However, if you don't need the subform, you can simply delete it. Just switch to Layout View or Design View, right-click on the subform, then select Delete from the contextual menu.

Add a Subform to an Existing Form

If you already have a form that you'd like to add a subform to, you can go ahead and add a subform to the existing form by adding a subform control.