How to 0pen multiple subforms from a main form using buttons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have one main table that contains students and it links to 5 different
tables using one to many relationships. I can create a main form to select a
student and see their information and have it include one subform created as
a linked from one of the 5 tables and it works great. I'd like to be able to
have 5 buttons so that it can open different linked subforms from the main
form. I can't get it to build this way. Is there a way to add linked forms
( using buttons to open in form view) to a main form after the main form is
already built?

Any help/suggestions would be greatly appreciated.

Thank you,
K
 
Ο/Η kneuhaus έγÏαψε:
I have one main table that contains students and it links to 5 different
tables using one to many relationships. I can create a main form to select a
student and see their information and have it include one subform createdas
a linked from one of the 5 tables and it works great. I'd like to be able to
have 5 buttons so that it can open different linked subforms from the main
form. I can't get it to build this way. Is there a way to add linked forms
( using buttons to open in form view) to a main form after the main form is
already built?

Any help/suggestions would be greatly appreciated.

Thank you,
K

Try to put all your 5 subforms into the main form. You could use toggle
buttons instead of simple buttons. Every time a button is clicked make
the subform that is connected to the button visible while you make the
rest of them invisible.
 
Try to put all your 5 subforms into the main form. You could use toggle
buttons instead of simple buttons. Every time a button is clicked make
the subform that is connected to the button visible while you make the
rest of them invisible.
 
Svetlana said:
Try to put all your 5 subforms into the main form. You could use
toggle buttons instead of simple buttons. Every time a button is
clicked make the subform that is connected to the button visible
while you make the rest of them invisible.

Better yet, if they are all simlarly sized you can use one subform control and
have your buttons control what form is displayed in it. Then you are not
loading all the forms when you are only using them one at a time. Your codee
just needs to change the SourceObject property.
 
Back
Top