Skip to content
Step by Step Internet 馃寪 Guides for learning to surf the Net

How to create a subform in a Microsoft Access database from scratch? Step by step guide

Microsoft Access is a tool that allows you to organize and work with your data. The program offers the possibility of making subforms to check the data of two informative tables at the same time. If you want to know how to create a subform in a database from scratch, keep reading this step by step guide.

The application developed for Windows works as a database management system, so it offers fast and efficient ways to deal with information.

If you want to have a better view of the informational record, you can make use of the forms and subforms in Access. So that you can achieve this, we will explain what they are, what they are for and the step by step to create a subform in a database of Access.

What is a subform and what is it for in Microsoft Access?

The most efficient way to query relational data is through subforms. However, What is a subform and what is it for in Microsoft Access? For in simple terms, it refers to a form contained in another form. The subform is a useful tool that it is used to visualize table data, sets of information on a particular topic, or to respond to a query or unknown provided by the user and whose response can come from several tables or another query.

The forms contain subforms. This allows locate one or more relationships between different data tables based on a primary key. Both fields are linked, so the subform displays the stored information for the current record of the main form.

What should I consider before creating a subform in a database?

What should I consider before creating a subform in a database?

The subforms They are handled according to certain basic terms, which refer to procedures that the application is responsible for carrying out. However, it is worth highlighting certain aspects What to consider before creating a subform in a database. Regarding the basic terminology of Microsoft Access, it is necessary to know what task each element develops.

The main ones are the following:

  • Subform control: It is a control that is responsible for inserting a form into another form. It allows you to link the data of the current record with that of the main form. It works as a detailed view of an object belonging to the database, which can be a table, query or another form.
  • Origin object property: It is the function that is in charge of determining the object to be displayed in the subform control.
  • Data sheet: It resembles the Microsoft Excel spreadsheet. Its function, simply, is to represent data in rows and columns.
  • Link main fields property: It is a function of the subform control that determines which are the main fields of the form that are linked to the subform.
  • Link child fields property: It is a function of the subform control that is responsible for locating the fields of the subform that are linked to the main form.

As additional information, keep in mind the following recommendations to obtain the best results when using Microsoft Access:

  • From the first moment, establishes relationships between data tables so that the automatic Access takes care of generating the links between the forms and subforms.
  • If the source object is a form, can be viewed as a continuous form or a datasheet, allowing you to add other fields to the subform control.
  • If the source object is a table or query, you can insert a dynamic view or datasheet in the form, starting from the creation of a subform control.

Learn step by step how to create a subform in Microsoft Access from scratch

Learn step by step how to create a subform in Microsoft Access from scratch

exist three methods to generate a subform in the application. You can choose the one that best suits your situation. On this occasion, we will show you the fastest alternative.

Here is a step-by-step introduction to how to create a subform in Microsoft Access from scratch:

Create a form that contains a subform

Can make use of the form wizard to create a main form, next to a subform. In this way, the system will take care of linking them.

The steps to follow are:

  • Open the app of Microsoft Access. Next, go to the tab "Create" and click on the group of "Forms".
  • Click on "Form Wizard".
  • A new window opens on the screen, which corresponds to the wizard. In the drop-down list of "Tables / Queries", you must select a data table or query to create a new form containing a subform that allows you to relate the data.
  • Click on the fields in the data table or query that you want to include in the main form. You must identify it.
  • In the wizard window, again in the drop-down list of "Tables / Queries", you must select another "Table / Query". This becomes the source of the subform.
  • Similarly, click on the fields of the data table or query that you want to add to the subform. You must identify it.
  • If the relational data has been correctly configured, then hit "Following". The wizard shows you the following question: How do you want to view the data?. In this section you must select which table or query corresponds to the main form. You must click on its identification.
  • In the same window, you must check the option of "Form with subforms". Then press "Following".
  • Now you must select the design you want on the page of "What layout do you want to apply to the subform?".
  • Then click "Following". Both layouts shown organize the data in rows and columns. However, tabular layout has more customization options.
  • On the next page of the form wizard, you should choose a format style. In case you have chosen the tabular layout in the previous section, the format is also applied to the subform.
  • At the final section of the wizard, you must enter a headline for created forms. In this way, Access is responsible for providing a name to the forms, according to the owner entered. Similarly, you must label the subform.
  • Finally, you should only decide how to open the form. You can do it in the "Form view", to be able to add or display data, or in the "Design view" to modify its design. When done, press "Finalize".
  • Microsoft Access create two forms. One that represents the main form, which contains the subform control.
  • The other represents the subform.