Creating a main form and associated forms that display same record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need help in learning to connect a main form with two or more associated
forms or subform(s) with the correct control and property entries. I want to
be able to see the same record in the associated forms or subforms as the
records in the main form that I scroll through.
 
Your subform source table must contain the main tables primary key as a
foreign key. Example:
Employee table has a primary key of EmpID, text, size 10. Benefits table has
a primary key of BenefitsId and a foreign key of EmpID, text, size 10. This
is how you create relationships between tables. Once this is done, then you
can base a form on the Benefits table and add it as a subform to the
Employee's Form.

The easiest way to create the main form/subform automatically is to create a
form using the wizard, pick the first table (Employee) adding all the fields
in to box on the right, DO NOT CLICK NEXT, pick the next table from the drop
down (Benefits) adding all the fields into the same location as the Employee
Fields, then click NEXT. As long as you have set your primary key/foreign
keys correctly, you will see a choice to create a mainform/subform form.
Continue following the wizard until finished.

Hope this helps. You may want to search google on Database Relationships or
Normalization of Tables.
 
Back
Top