View Full Version : Populating and Linking to another form


LKE
05-03-2002, 12:29 PM
I have created 2 separate forms -> both have a customer ID field. I would like to place a button on Form #1 that a.) opens a new record in form #2 and b.) populates the customer ID field based on what was entered in Form #1. Any thoughts....please help! thanks!!

Jack Cowley
05-03-2002, 01:16 PM
Sounds like you have a one to many relationship. If so your second form can be a subform of Form1. Access will automatically add the ID as you add new data to a new record in the subform.

If you have something else going then use the OpenArgs argument of the OpenForm method to pass the ID to Form2. Help has the code you need.

If Form1 remains open then Form2 can get the ID from Form1.