Solved

Command Button to Open another form

Posted on 2008-06-23
6
1,845 Views
Last Modified: 2013-11-29
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?
0
Comment
Question by:Michael2008
  • 3
  • 3
6 Comments
 

Author Comment

by:Michael2008
ID: 21849726
Here is the file, forgot to attach it:
Table-Relationships.JPG
0
 
LVL 13

Accepted Solution

by:
wiswalld earned 500 total points
ID: 21849760
DoCmd.Openform "Form2"
DoCmd.Close acForm, "Form1"

As for the other this is two seperate questions.
0
 
LVL 13

Assisted Solution

by:wiswalld
wiswalld earned 500 total points
ID: 21849770
In the on open for for2

DoCmd.Maximize
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 13

Expert Comment

by:wiswalld
ID: 21849794
What table is form one based on? Will the unique number from form1 also be a unique number on form2?
0
 

Author Comment

by:Michael2008
ID: 21850153
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
 

Author Comment

by:Michael2008
ID: 21875651
Ok, since it is two seperate questions and there has been no responses for a while, I have decided to close this question.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now