Open multiple instances of subform (1 Viewer)

Falcon88

Registered User.
Local time
Tomorrow, 01:06
Joined
Nov 4, 2014
Messages
317
Hii all dears
I have an Access database with a main form that contains 9 subforms.
I created 9 tabs, each containing one subform, and each subform uses a parameter based on the tab it is located on.

All the subforms have the same record source and design, but they differ only by a single parameter.

This becomes very time-consuming and tiring when I need to change code, make modifications, or add features, because I have to edit all 9 subforms separately.

My question: What is the best way to design just one subform so that it opens in the selected tab and changes only the parameter accordingly?
 
Yes you should have one and only one form. In fact I would go further and say you only have one subform too.
What is the parameter? is is a filter?
 
You can take a subform and put it in front of the tab, not on a page in the tab. It will look like it is on the page, but since it is in front it will seem as if it is on all pages. Then when you change the tab control all you are really doing is modifying the source object. The other way is to have 9 subform controls with the same source object, and modify each one of those. That is not quite as efficient and time saving.
 
You can take a subform and put it in front of the tab, not on a page in the tab. It will look like it is on the page, but since it is in front it will seem as if it is on all pages. Then when you change the tab control all you are really doing is modifying the source object. The other way is to have 9 subform controls with the same source object, and modify each one of those. That is not quite as efficient and time saving.
Can you give me a sample ?
 
Yes you should have one and only one form. In fact I would go further and say you only have one subform too.
What is the parameter? is is a filter
Really the record source is a query with one condition related to the page index no
And there a combobox on that subform filtered by the page index no
 
One main form, one subform and in the subform control properties, set the link child/master properties to set the filter
 
Can you give me a sample ?
I have the subform hanging over the tab so you can see what is going on. If you make the tab wider then it appears on the tab.
 

Attachments

Here is another example. You say you have nine tabs now. But maybe this could grow to 15, or 20. If that is the case you can add 20 tabs now and then configure the ones you use at runtime. It could pull this data from a table.

In this example a law firm has a different number of partners. When you pick a law firm it configures a tab for each partner based on data in the table. Then it does a similar filtering to that in the other example.
 

Attachments

Users who are viewing this thread

Back
Top Bottom