"How can I accomplish to accelarate the performance" you will take a performance hit both ways.
If you load all your tabs with all your subforms then the hit will be when the form opens.
If you use a single subform control then the hit will be when the user moves from 1 tab to the next, or geos back to a tab
Finally you could have separate subform controls on each tab but not load them until the user selects that tab. This eliminates the need to load a tab you have already loaded.
Cheers, Andrew
Main Topics
Browse All Topics





by: pteranodon72Posted on 2009-01-13 at 15:00:56ID: 23368309
For best performance, you want to use a single subform control and have it load a different source object each time the tab is changed.
= "your field(s)"
Let's call your subform control scfChild. Instead of placing it on one page of the tab control, create it on the Detail section of the form, move it over the tab control and use Format->Bring to Front to make it appear in front of the tab control and in front of every page. Size it big enough to hold the largest subform to avoid annoying scrollbars.
In the tab control's Change event:
Select Case myTabControl.Value
Case 0:
sfcChild.SourceObject = "fSubDB Rate"
'If necessary, change the Child/Master Link Fields also:
'sfcChild.LinkMasterFields
'sfcChild.LinkChildFields = "your field(s)"
Case 1:
sfcChild.SourceObject = "fSubSN Rate"
Case 2:
sfcChild.SourceObject = "fSubPID Rate"
.
.
.
'you'll continue until Case #pages - 1
--------
Set the SourceObject of the subform to the default tab's subform name.
HTH,
pT