Tab Control with multiple subforms

S

skk

Hi!

I have a multiple tables with one to many relationships. I would like to
have a main form with multiple subform in tab Control (3 tabs, 3 subforms).

Main form, tbl1
Tab1, tbl2 (subform of tbl1)
Tab2, tbl3 (subform of tbl2)
Tab3, tbl4 (subform of tbl3)

Question is, Tab1 subform works fine with main form as parent but for Tab2 &
Tab3 is not subform of main form. Tab2 is subform of Tab1 & Tab3 is subform
of Tab2. What do I have to do to make Tab2 & Tab3 subform of preceding Tab

I hope I'm making sense. Thanks
 
S

strive4peace

put calculated controls on the main form to provide the
links you need for LinkMasterFields

put a calculated field on your mainform that holds the
primary key value of your firstsubform, then put another
subform on the main form and use the calculated control in
the LinkMasterFields for the second subform

Name --> continuousPrimaryKey
controlsource -->
=subform_controlname.form.primarykey_controlname

sooo... instead of nesting the second subform on the first
form, put it directly on the main form, but it will still
behave as if it were on the first subform

you can use the same analogy for the link to the third subform


make textbox

Warm Regards,
Crystal
MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 
S

skk

First, thank you for responding. Maybe I'm not fully understanding your
suggestion. Yes, I've added the caluculated field in the mainform to hold
the primanry key value of the first subform. Then I've created second
subform and added to the second tab but when I tried to create a relationship
"LinkMasterFields" & "LinkChildFields", the LinkMasterFields will only show
the lists of the fields in the table1 not the "continuousPrimaryKey".
 
S

skk

I just want to share this info with anyone who might run into a same problem.
What Crystal has suggested works perfect what I needed to do was to put this
newly created field name "continuousPrimaryKey" in the LinkMasterFields even
though new field name doesn't show on the drop down menu it still links
correctly. Thank you Crystal!
 
S

strive4peace

you're welcome, skk ;) happy to help

Warm Regards,
Crystal
MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 

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