Linked Form Problems

Y

Yodaboy

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!!
 
K

Klatuu

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.
 
Y

Yodaboy

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.
 
K

Klatuu

If you open the codes form from you first form and then close it, it will
return the focus to the first form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top