Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form for one to many 1

Status
Not open for further replies.

tlove161

Technical User
Feb 5, 2004
42
0
0
US
I have a table that is the "one" side of the relationship. This table has a primary key (autonumber). I have a second table "many side" which is linked to the "one side" by the primary key.

I have created a form for the "one" table, but how do I enter records into the "many" table via the form. I need the primary key to be assigned to each record created in the "many" table.

Any guidence is appreciated.
 
I would create a sub-form to display the 'many' table. If you let Access create the sub form with the Wizard feature turned on, it will guide you through how to identify the Primary Key field in the main table, and link this to the foreign key field in the sub table.

If you set the sub-form view to 'continuous forms' you should then be able to see one or more sub-records, linked to a given main record. As you scroll / move through the main records, Access will display the related sub records in the sub-form.

If the main form is already quite large, consider adding a tab control to the form. You could set up two tabs, and place the existing main form fields on the first tab. Then create the sub-form on the second tab, to give a neat result.

Bob Stubbs
 
Bob

Thank you. The sub form now does what I need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top