3 generations tables on the form

I

iccsi

I have 3 generations tables on the form like parent, children and
grandchildren.

I use form for the parent and subform for the children.
If I use subform for grandchildren then the form will too crowdy. I am
looking for a control that can expand and collapse for the
grandchilren when user needs to see the grandchildren.

I was thinking to have a button to open anonther form to view
grandchildren if I can not find any controls suitable.

Your information is great appreciated,
 
A

Allen Browne

Assuming you have created the one-to-many relationships (with referential
integrity), you could use a tab control. First tab shows just the main
table. Second tab shows the children. Third tab shows the grandchildren.

For the grandchildren form, you need to create a query that contains uses
table2 and table3. Output all fields from table3 (*), and the foreign key
field from table2 (the one that relates back to table1.) You can now use
that foreign key field in the LinkChildFields of the subform control, to
show the correct grandchildren for the record in the main form.
 
I

iccsi

Assuming you have created the one-to-many relationships (with referential
integrity), you could use a tab control. First tab shows just the main
table. Second tab shows the children. Third tab shows the grandchildren.

For the grandchildren form, you need to create a query that contains uses
table2 and table3. Output all fields from table3 (*), and the foreign key
field from table2 (the one that relates back to table1.) You can now use
that foreign key field in the LinkChildFields of the subform control, to
show the correct grandchildren for the record in the main form.

--
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.









- Show quoted text -

Thanks for advise,
It is a good solution which has all 3 generations tables on the same
form without adding a button to view grandchildren.
The only thing is user can only see one generation at one time.
User click the first tab then does not see second and third tab and
click second tab can not see parant and grandchildren.

Thanks again,
 
A

Allen Browne

If you have spare screen space, you don't have to use the tab control.

That was only suggested becauase your original post suggested:
... the form will too crowdy ...

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.
Assuming you have created the one-to-many relationships (with referential
integrity), you could use a tab control. First tab shows just the main
table. Second tab shows the children. Third tab shows the grandchildren.

For the grandchildren form, you need to create a query that contains uses
table2 and table3. Output all fields from table3 (*), and the foreign key
field from table2 (the one that relates back to table1.) You can now use
that foreign key field in the LinkChildFields of the subform control, to
show the correct grandchildren for the record in the main form.









- Show quoted text -

Thanks for advise,
It is a good solution which has all 3 generations tables on the same
form without adding a button to view grandchildren.
The only thing is user can only see one generation at one time.
User click the first tab then does not see second and third tab and
click second tab can not see parant and grandchildren.

Thanks again,
 
P

Paul Shapiro

If you have space, you could have a main form with the parent record. On the
first tab you could put a listbox that lets the user select the child
record, and a subform that shows the grandchildren. The second tab could
show the child details. Or the main form header could have a combo box to
select the parent record, with the child and grandchild details shown in
subforms and the parent details on another tab. You can do any combination
you want. Double-clicking can be used to popup a form with details, or to
change tabs. Etc.

I've used a navigation listbox, as in the first suggestion, which was wide
enough to show all the data fields. Then set the listbox width to be narrow,
so it just shows enough to be used for navigation and the details subform is
visible to its right. I added buttons to expand/contract the listbox width,
so with one click it expands over the subform to its right and shows all the
data for each listbox row. Another click and it shrinks the width to reveal
the detailed subform.

Any of these approaches can give an overview all on one screen, but not all
the details.
 
I

iccsi

If you have space, you could have a main form with the parent record. On the
first tab you could put a listbox that lets the user select the child
record, and a subform that shows the grandchildren. The second tab could
show the child details. Or the main form header could have a combo box to
select the parent record, with the child and grandchild details shown in
subforms and the parent details on another tab. You can do any combination
you want. Double-clicking can be used to popup a form with details, or to
change tabs. Etc.

I've used a navigation listbox, as in the first suggestion, which was wide
enough to show all the data fields. Then set the listbox width to be narrow,
so it just shows enough to be used for navigation and the details subformis
visible to its right. I added buttons to expand/contract the listbox width,
so with one click it expands over the subform to its right and shows all the
data for each listbox row. Another click and it shrinks the width to reveal
the detailed subform.

Any of these approaches can give an overview all on one screen, but not all
the details.









- Show quoted text -

Thanks millions,
 
I

iccsi

If you have spare screen space, you don't have to use the tab control.

That was only suggested becauase your original post suggested:
    ... the form will too crowdy ...

--
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html






Thanks for advise,
It is a good solution which has all 3 generations tables on the same
form without adding a button to view grandchildren.
The only thing is user can only see one generation at one time.
User click the first tab then does not see second and third tab and
click second tab can not see parant and grandchildren.

Thanks again,- Hide quoted text -

- Show quoted text -

Thanks millions,
 

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