467,081 Members | 989 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,081 developers. It's quick & easy.

main form + 3 subforms / manual forms linking

I have 4 hierarchical tables and want to display it all together as a form and 3 subforms, when subform displays (and allow to add/edit) only relevant items from each superior subform.

Tables are:
Clients --> linked thru id_client --> Orders --> linked thru id_order --> Licences --> linked thru id_licence --> Regkeys

Access' Form Wizard allows only form + 2 subforms. I tried to create last subform and its link manually, but I'm not successful.

2nd subform (Orders) is linked by:

Link Child Fields: id_client
Link Master Fields: id_client

3rd subform (Licences) is linked by
Link Child Fields: id_order
Link Master Fields: [order Subform].Form![id_order]

which is generated by Access and works satisfyingly. I tried to link last subform (Regkeys) analogically as:

Link Child Fields: id_licence
Link Master Fields: [licence Subform].Form![id_licence]

but it doesn't work and all records are displayed instead of relevant.

Only solution that works is to use subform which is form with 2 subforms, but I'd like other solution.

Any advices? Thanks ahead.
version: MS Access 2003 Czech (so I hope to use correct terms)
Jun 21 '07 #1
  • viewed: 7389
2 Replies
Expert Mod 8TB
As far as I know the maximum of nested subforms is two. However, try this.

Open the licences subform on its own in design view and try using the wizard to add the last subform. This should work. whether the main form will now work with 3 nested subforms I don't know.
Jun 22 '07 #2
Problem solved :-)

I copied and modified linking between 3rd and 4th table (as described before), but miss VB code on Current event (for Licences subform, which on Current event refreshes subordinate subform Regkeys), which should be copied and modified analogically. This code makes requery operation which ensure relevant records in last subform.

Solution you propose will probably work (I tried complete nesting: one form + one subform, where subform is form + subform again...etc), but I don't like this aesthetically ;-)

Anyway thanks for your answer, I "entertained" myself with this problem all yesterday without solution.
Last note in part "Create a form with two subforms" http://office.microsoft.com/en-gb/ac...CH063650401033
Jun 22 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by William Wisnieski | last post: by
8 posts views Thread by Zlatko Matić | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.