Create a form and a subform at the same time

Create a form and a subform at the same time

Before using this procedure, make sure you've set up your table relationships correctly.

  1. In the Database window, click Forms under Objects.

  2. Click the New button on the Database window toolbar.

  3. In the New Form dialog box, double-click Form Wizard in the list.

  4. In the first wizard dialog box, select a table or query from the list. For example, to create a Categories form that displays products for each category in a subform, select the Categories table (the "one" side of the one-to-many relationship).

  5. Double-click the fields you want to include from this table or query.

  6. In the same wizard dialog box, select another table or query from the list. Using the same example, select the Products table (the "many" side of the one-to-many relationship in the Categories form example).

    Note   It doesn't matter which table or query you choose first.

  7. Double-click the fields you want to include from this table or query.

  8. When you click Next, if you set up the relationships correctly before starting the wizard, the wizard asks which table or query you want to view by. Using the same example, to create the Categories form, click By Categories.

  9. In the same wizard dialog box, select the Form With Subform(s) option.

  10. Follow the directions in the remaining wizard dialog boxes. When you click Finish, Microsoft Access creates two forms, one for the main form and subform control, and one for the subform.

Notes