Command Button to Open another form

I have attached a screen shot with the relationships of the three tables that are included in my question.

So I have a Form 1 to enter data into the four Requirements Table fields (ID is an auto-gen number)
What I want is a command button on Form 1 that will close Form 1 then open and maximize Form 2.  In Form 2 I want to search through the People Table and find a record.  Then I want to be able to enter in several Roles via Form 2 that will create multiple entries into the Requirements People Table.  It should automatically enter in the ID that is autogenerated after creating a Requirement entry from Form 1, and it should automatically enter the unique Employee ID from the People record that you chose in Form 2.  It should enter these two things into the Requirements People Table for each role (different record) that is chosen.

So my questions are, what would be the VBA code for the command button on Form 1?
How can I set up Form 2 to accomplish this feat?
Michael2008Asked:
Who is Participating?
 
wiswalldCommented:
DoCmd.Openform "Form2"
DoCmd.Close acForm, "Form1"

As for the other this is two seperate questions.
0
 
Michael2008Author Commented:
Here is the file, forgot to attach it:
Table-Relationships.JPG
0
 
wiswalldCommented:
In the on open for for2

DoCmd.Maximize
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
wiswalldCommented:
What table is form one based on? Will the unique number from form1 also be a unique number on form2?
0
 
Michael2008Author Commented:
Form 1 is based on the Requirements table, the fields that are entered are Section, Title, Applicability, and Description.  Then ID is simply and autogenerated integer, that is made once for each new data entry into the Requirements Table.  I created it that way so that I would have a primary key to like the Requirements table to the Requirements People table.  It will not be unique on Form 2, as there can be several different people linked with each requirement in various roles.  The Requirements People table has no primary key.  Let me know if you need any other clarifications, and thanks for the help.
0
 
Michael2008Author Commented:
Ok, since it is two seperate questions and there has been no responses for a while, I have decided to close this question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.