If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Linked Form Problems
Hi,
Can anybody help me with the following; I have a form which holds requisition number data and a brief description. A second form called "Codes" which holds cost code information related to the requisition header form and "Codes" also has a subform which allocates school names to each cost code. My problem is then when I try to complete the header form then click a button to start completing the information on "Codes" the "codes" form doesn't have the ReqID from the header form. They are nested fine in the table layout and I have relationships from each of the forms. I have tried to add both a toggle button and then tried a command button to open the second form with the same Requisition ID as the header form but I cant get it to work, can anybody help me? I'm going crazy!! |
#2
|
|||
|
|||
Linked Form Problems
Forms have no knowledge of your table relationships. If it is a
form/subform, then you use the Link Master and Link Child fields properties of the subform control to establish the relationship. If it is two separate forms, you can use the Where argument of the OpenForm method to cause the form to open on a specific record or you can pass the value to the second form using the OpenArgs argument and let the second form find the correct record. -- Dave Hargis, Microsoft Access MVP "Yodaboy" wrote: Hi, Can anybody help me with the following; I have a form which holds requisition number data and a brief description. A second form called "Codes" which holds cost code information related to the requisition header form and "Codes" also has a subform which allocates school names to each cost code. My problem is then when I try to complete the header form then click a button to start completing the information on "Codes" the "codes" form doesn't have the ReqID from the header form. They are nested fine in the table layout and I have relationships from each of the forms. I have tried to add both a toggle button and then tried a command button to open the second form with the same Requisition ID as the header form but I cant get it to work, can anybody help me? I'm going crazy!! |
#3
|
|||
|
|||
Linked Form Problems
Thanks for your reply. i have now attached the "codes" form to the header
form as a subform but they are both huge forms due to the details. i really wanted to be able to opne the "Codes" form as a seperate form is there any code I can use which will open the subform as its own from and then on closing returns to the header form. Thanks again. "Klatuu" wrote: Forms have no knowledge of your table relationships. If it is a form/subform, then you use the Link Master and Link Child fields properties of the subform control to establish the relationship. If it is two separate forms, you can use the Where argument of the OpenForm method to cause the form to open on a specific record or you can pass the value to the second form using the OpenArgs argument and let the second form find the correct record. -- Dave Hargis, Microsoft Access MVP "Yodaboy" wrote: Hi, Can anybody help me with the following; I have a form which holds requisition number data and a brief description. A second form called "Codes" which holds cost code information related to the requisition header form and "Codes" also has a subform which allocates school names to each cost code. My problem is then when I try to complete the header form then click a button to start completing the information on "Codes" the "codes" form doesn't have the ReqID from the header form. They are nested fine in the table layout and I have relationships from each of the forms. I have tried to add both a toggle button and then tried a command button to open the second form with the same Requisition ID as the header form but I cant get it to work, can anybody help me? I'm going crazy!! |
#4
|
|||
|
|||
Linked Form Problems
If you open the codes form from you first form and then close it, it will
return the focus to the first form. -- Dave Hargis, Microsoft Access MVP "Yodaboy" wrote: Thanks for your reply. i have now attached the "codes" form to the header form as a subform but they are both huge forms due to the details. i really wanted to be able to opne the "Codes" form as a seperate form is there any code I can use which will open the subform as its own from and then on closing returns to the header form. Thanks again. "Klatuu" wrote: Forms have no knowledge of your table relationships. If it is a form/subform, then you use the Link Master and Link Child fields properties of the subform control to establish the relationship. If it is two separate forms, you can use the Where argument of the OpenForm method to cause the form to open on a specific record or you can pass the value to the second form using the OpenArgs argument and let the second form find the correct record. -- Dave Hargis, Microsoft Access MVP "Yodaboy" wrote: Hi, Can anybody help me with the following; I have a form which holds requisition number data and a brief description. A second form called "Codes" which holds cost code information related to the requisition header form and "Codes" also has a subform which allocates school names to each cost code. My problem is then when I try to complete the header form then click a button to start completing the information on "Codes" the "codes" form doesn't have the ReqID from the header form. They are nested fine in the table layout and I have relationships from each of the forms. I have tried to add both a toggle button and then tried a command button to open the second form with the same Requisition ID as the header form but I cant get it to work, can anybody help me? I'm going crazy!! |
Thread Tools | |
Display Modes | |
|
|