dbTalk Databases Forums  

Sub-forms on tabs

comp.databases.ms-access comp.databases.ms-access


Discuss Sub-forms on tabs in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
musicloverlch
 
Posts: n/a

Default Sub-forms on tabs - 04-29-2010 , 01:09 PM






Hi all!

I have a performance issue with a multiple tabs in a database. I want
to change the programming so that a tab is only populated if it become
active. I have successfully gotten a tab to stay blank until I
clicked on it, but I want it to populate when that tab becomes
active. How do I do that programmaticly?

Thanks in advance,
Laura

Reply With Quote
  #2  
Old   
Rich P
 
Posts: n/a

Default Re: Sub-forms on tabs - 04-29-2010 , 03:19 PM






Hi Laura,

Try using subforms on your tabs. Just create a subform as you need and
drag it onto a respective tab in the design view of the form that
contains your tab control. Then you can manipulate the subform instead
of the tab control -- much easier.

Rich

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #3  
Old   
Lars Brownies
 
Posts: n/a

Default Re: Sub-forms on tabs - 04-29-2010 , 04:57 PM



Maybe this will help:
http://www.fmsinc.com/microsoftacces...ateBinding.asp

Lars

"musicloverlch" <lhowey (AT) gmail (DOT) com> schreef in bericht
news:1ba44748-2f4c-4d07-a4e3-8cf4f33d27dc (AT) s2g2000yqa (DOT) googlegroups.com...
Quote:
Hi all!

I have a performance issue with a multiple tabs in a database. I want
to change the programming so that a tab is only populated if it become
active. I have successfully gotten a tab to stay blank until I
clicked on it, but I want it to populate when that tab becomes
active. How do I do that programmaticly?

Thanks in advance,
Laura

Reply With Quote
  #4  
Old   
paii, Ron
 
Posts: n/a

Default Re: Sub-forms on tabs - 04-30-2010 , 06:59 AM



Don't put subforms on tabs; even if hidden, a sub form is loaded when the
form is opened. Put 1 subform control on the form and change the source when
a new tab is clicked.

"musicloverlch" <lhowey (AT) gmail (DOT) com> wrote

Quote:
Hi all!

I have a performance issue with a multiple tabs in a database. I want
to change the programming so that a tab is only populated if it become
active. I have successfully gotten a tab to stay blank until I
clicked on it, but I want it to populate when that tab becomes
active. How do I do that programmaticly?

Thanks in advance,
Laura

Reply With Quote
  #5  
Old   
bobh
 
Posts: n/a

Default Re: Sub-forms on tabs - 04-30-2010 , 08:21 AM



On Apr 29, 2:09*pm, musicloverlch <lho... (AT) gmail (DOT) com> wrote:
Quote:
Hi all!

I have a performance issue with a multiple tabs in a database. I want
to change the programming so that a tab is only populated if it become
active. *I have successfully gotten a tab to stay blank until I
clicked on it, but I want it to populate when that tab becomes
active. *How do I do that programmaticly?

Thanks in advance,
Laura
This is how I've done it, hope it makes sense

Select Case TabCtl157.Pages.Item(TabCtl157.Value).Name
Case "Tab1"
If Len([Child204].SourceObject) = 0 Or Me.Child204.SourceObject =
"zzzBlankFormForTabControl" Then
[Child204].SourceObject = "Call log_Archived Subform"
[Child204].LinkChildFields = "CUST_ID"
End If
Case "Tab2"
If Len([Child167].SourceObject) = 0 Or Me.Child167.SourceObject =
"zzzBlankFormForTabControl" Then
[Child167].SourceObject = "F-New Business Policy Type Subform"
[Child167].LinkChildFields = "CUST_ID"
End If
Case "Tab3"
If Len([F-Renewal Policy Type Subform].SourceObject) = 0 Or
Me.F_Renewal_Policy_Type_Subform.SourceObject =
"zzzBlankFormForTabControl" Then
[F-Renewal Policy Type Subform].SourceObject = "F-Renewal Policy
Type Subform"
[F-Renewal Policy Type Subform].LinkChildFields = "CUST_ID"
End If
Case "Tab4"
If Len([Child223].SourceObject) = 0 Or Me.Child223.SourceObject =
"zzzBlankFormForTabControl" Then
[Child223].SourceObject = "F-Endt subform"
[Child223].LinkChildFields = "CUST_ID"
End If
Case "Tab5"
If Len([F-Additional Code subform].SourceObject) = 0 Or
Me.F_Additional_Code_subform.SourceObject =
"zzzBlankFormForTabControl" Then
[F-Additional Code subform].SourceObject = "F-Additional Code
subform"
[F-Additional Code subform].LinkChildFields = "MSTR_AGCY_CD"
End If
Case "Tab6"
If Len([Child212].SourceObject) = 0 Or Me.Child212.SourceObject =
"zzzBlankFormForTabControl" Then
[Child212].SourceObject = "F-Certificates subform"
[Child212].LinkChildFields = "CUST_ID"
End If
Case "Tab7"
If Len([sbfrmAutoInfo].SourceObject) = 0 Or
Me.sbfrmAutoInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmAutoInfo].SourceObject = "sbfrmAutoInfo"
[sbfrmAutoInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab8"
If Len([sbfrmBopPackageInfo].SourceObject) = 0 Or
Me.sbfrmBopPackageInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmBopPackageInfo].SourceObject = "sbfrmBopPackageInfo"
[sbfrmBopPackageInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab9"
If Len([sbfrmWorkCompInfo].SourceObject) = 0 Or
Me.sbfrmWorkCompInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmWorkCompInfo].SourceObject = "sbfrmWorkCompInfo"
[sbfrmWorkCompInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab10"
If Len([sbfrmUmbrellaInfo].SourceObject) = 0 Or
Me.sbfrmUmbrellaInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmUmbrellaInfo].SourceObject = "sbfrmUmbrellaInfo"
[sbfrmUmbrellaInfo].LinkChildFields = "CUST_ID"
End If

End Select

Reply With Quote
  #6  
Old   
Lars Brownies
 
Posts: n/a

Default Re: Sub-forms on tabs - 04-30-2010 , 01:05 PM



What is the reason for using a dummy form "zzzBlankFormForTabControl"?

Lars

"bobh" <vulcaned (AT) yahoo (DOT) com> schreef in bericht
news:4cebf6f4-9abd-4242-b835-14fc393af787 (AT) y12g2000vbg (DOT) googlegroups.com...
Quote:
On Apr 29, 2:09 pm, musicloverlch <lho... (AT) gmail (DOT) com> wrote:
Hi all!

I have a performance issue with a multiple tabs in a database. I want
to change the programming so that a tab is only populated if it become
active. I have successfully gotten a tab to stay blank until I
clicked on it, but I want it to populate when that tab becomes
active. How do I do that programmaticly?

Thanks in advance,
Laura

This is how I've done it, hope it makes sense

Select Case TabCtl157.Pages.Item(TabCtl157.Value).Name
Case "Tab1"
If Len([Child204].SourceObject) = 0 Or Me.Child204.SourceObject =
"zzzBlankFormForTabControl" Then
[Child204].SourceObject = "Call log_Archived Subform"
[Child204].LinkChildFields = "CUST_ID"
End If
Case "Tab2"
If Len([Child167].SourceObject) = 0 Or Me.Child167.SourceObject =
"zzzBlankFormForTabControl" Then
[Child167].SourceObject = "F-New Business Policy Type Subform"
[Child167].LinkChildFields = "CUST_ID"
End If
Case "Tab3"
If Len([F-Renewal Policy Type Subform].SourceObject) = 0 Or
Me.F_Renewal_Policy_Type_Subform.SourceObject =
"zzzBlankFormForTabControl" Then
[F-Renewal Policy Type Subform].SourceObject = "F-Renewal Policy
Type Subform"
[F-Renewal Policy Type Subform].LinkChildFields = "CUST_ID"
End If
Case "Tab4"
If Len([Child223].SourceObject) = 0 Or Me.Child223.SourceObject =
"zzzBlankFormForTabControl" Then
[Child223].SourceObject = "F-Endt subform"
[Child223].LinkChildFields = "CUST_ID"
End If
Case "Tab5"
If Len([F-Additional Code subform].SourceObject) = 0 Or
Me.F_Additional_Code_subform.SourceObject =
"zzzBlankFormForTabControl" Then
[F-Additional Code subform].SourceObject = "F-Additional Code
subform"
[F-Additional Code subform].LinkChildFields = "MSTR_AGCY_CD"
End If
Case "Tab6"
If Len([Child212].SourceObject) = 0 Or Me.Child212.SourceObject =
"zzzBlankFormForTabControl" Then
[Child212].SourceObject = "F-Certificates subform"
[Child212].LinkChildFields = "CUST_ID"
End If
Case "Tab7"
If Len([sbfrmAutoInfo].SourceObject) = 0 Or
Me.sbfrmAutoInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmAutoInfo].SourceObject = "sbfrmAutoInfo"
[sbfrmAutoInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab8"
If Len([sbfrmBopPackageInfo].SourceObject) = 0 Or
Me.sbfrmBopPackageInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmBopPackageInfo].SourceObject = "sbfrmBopPackageInfo"
[sbfrmBopPackageInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab9"
If Len([sbfrmWorkCompInfo].SourceObject) = 0 Or
Me.sbfrmWorkCompInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmWorkCompInfo].SourceObject = "sbfrmWorkCompInfo"
[sbfrmWorkCompInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab10"
If Len([sbfrmUmbrellaInfo].SourceObject) = 0 Or
Me.sbfrmUmbrellaInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmUmbrellaInfo].SourceObject = "sbfrmUmbrellaInfo"
[sbfrmUmbrellaInfo].LinkChildFields = "CUST_ID"
End If

End Select

Reply With Quote
  #7  
Old   
bobh
 
Posts: n/a

Default Re: Sub-forms on tabs - 04-30-2010 , 03:33 PM



On Apr 30, 2:05*pm, "Lars Brownies" <L... (AT) Browniew (DOT) com> wrote:
Quote:
What is the reason for using a dummy form "zzzBlankFormForTabControl"?

Lars

"bobh" <vulca... (AT) yahoo (DOT) com> schreef in berichtnews:4cebf6f4-9abd-4242-b835-14fc393af787 (AT) y12g2000vbg (DOT) googlegroups.com...



On Apr 29, 2:09 pm, musicloverlch <lho... (AT) gmail (DOT) com> wrote:
Hi all!

I have a performance issue with a multiple tabs in a database. I want
to change the programming so that a tab is only populated if it become
active. *I have successfully gotten a tab to stay blank until I
clicked on it, but I want it to populate when that tab becomes
active. *How do I do that programmaticly?

Thanks in advance,
Laura

This is how I've done it, hope it makes sense

* Select Case TabCtl157.Pages.Item(TabCtl157.Value).Name
* Case "Tab1"
* If Len([Child204].SourceObject) = 0 Or Me.Child204.SourceObject =
"zzzBlankFormForTabControl" Then
* [Child204].SourceObject = "Call log_Archived Subform"
* [Child204].LinkChildFields = "CUST_ID"
* End If
*Case "Tab2"
* *If Len([Child167].SourceObject) = 0 Or Me.Child167.SourceObject =
"zzzBlankFormForTabControl" Then
* *[Child167].SourceObject = "F-New Business Policy Type Subform"
* *[Child167].LinkChildFields = "CUST_ID"
* *End If
* *Case "Tab3"
* *If Len([F-Renewal Policy Type Subform].SourceObject) = 0 Or
Me.F_Renewal_Policy_Type_Subform.SourceObject =
"zzzBlankFormForTabControl" Then
* *[F-Renewal Policy Type Subform].SourceObject = "F-Renewal Policy
Type Subform"
* *[F-Renewal Policy Type Subform].LinkChildFields = "CUST_ID"
* *End If
*Case "Tab4"
* *If Len([Child223].SourceObject) = 0 Or Me.Child223.SourceObject =
"zzzBlankFormForTabControl" Then
* *[Child223].SourceObject = "F-Endt subform"
* *[Child223].LinkChildFields = "CUST_ID"
* *End If
*Case "Tab5"
* *If Len([F-Additional Code subform].SourceObject) = 0 Or
Me.F_Additional_Code_subform.SourceObject =
"zzzBlankFormForTabControl" Then
* *[F-Additional Code subform].SourceObject = "F-Additional Code
subform"
* *[F-Additional Code subform].LinkChildFields = "MSTR_AGCY_CD"
* *End If
* Case "Tab6"
* *If Len([Child212].SourceObject) = 0 Or Me.Child212.SourceObject =
"zzzBlankFormForTabControl" Then
* *[Child212].SourceObject = "F-Certificates subform"
* *[Child212].LinkChildFields = "CUST_ID"
* *End If
* *Case "Tab7"
* *If Len([sbfrmAutoInfo].SourceObject) = 0 Or
Me.sbfrmAutoInfo.SourceObject = "zzzBlankFormForTabControl" Then
* *[sbfrmAutoInfo].SourceObject = "sbfrmAutoInfo"
* *[sbfrmAutoInfo].LinkChildFields = "CUST_ID"
* *End If
* *Case "Tab8"
* *If Len([sbfrmBopPackageInfo].SourceObject) = 0 Or
Me.sbfrmBopPackageInfo.SourceObject = "zzzBlankFormForTabControl" Then
* *[sbfrmBopPackageInfo].SourceObject = "sbfrmBopPackageInfo"
* *[sbfrmBopPackageInfo].LinkChildFields = "CUST_ID"
* *End If
* *Case "Tab9"
* *If Len([sbfrmWorkCompInfo].SourceObject) = 0 Or
Me.sbfrmWorkCompInfo.SourceObject = "zzzBlankFormForTabControl" Then
* *[sbfrmWorkCompInfo].SourceObject = "sbfrmWorkCompInfo"
* *[sbfrmWorkCompInfo].LinkChildFields = "CUST_ID"
* *End If
* *Case "Tab10"
* *If Len([sbfrmUmbrellaInfo].SourceObject) = 0 Or
Me.sbfrmUmbrellaInfo.SourceObject = "zzzBlankFormForTabControl" Then
* *[sbfrmUmbrellaInfo].SourceObject = "sbfrmUmbrellaInfo"
* *[sbfrmUmbrellaInfo].LinkChildFields = "CUST_ID"
* *End If

* *End Select- Hide quoted text -

- Show quoted text -
each tab was tied to a different table(as you can see by the name of
each subform), the dummy subform had No record source so the subforms
of the tab control did not have to connect to the different tables
when the form was opened thus the form opened faster and function
quickier without having all the subform tables opened......... make
sense???

Reply With Quote
  #8  
Old   
Lars Brownies
 
Posts: n/a

Default Re: Sub-forms on tabs - 04-30-2010 , 03:53 PM



Quote:
each tab was tied to a different table(as you can see by the name of
each subform), the dummy subform had No record source so the subforms
of the tab control did not have to connect to the different tables
when the form was opened thus the form opened faster and function
quickier without having all the subform tables opened......... make
sense???
I understand the concept but I don't understand why you need the dummy form.
Why don't you just leave the SourceObject value blank?

Lars


"bobh" <vulcaned (AT) yahoo (DOT) com> schreef in bericht
news:3289d994-7242-4178-b282-b27371fd76e0 (AT) x1g2000vbo (DOT) googlegroups.com...
Quote:
On Apr 30, 2:05 pm, "Lars Brownies" <L... (AT) Browniew (DOT) com> wrote:
What is the reason for using a dummy form "zzzBlankFormForTabControl"?

Lars

"bobh" <vulca... (AT) yahoo (DOT) com> schreef in
berichtnews:4cebf6f4-9abd-4242-b835-14fc393af787 (AT) y12g2000vbg (DOT) googlegroups.com...



On Apr 29, 2:09 pm, musicloverlch <lho... (AT) gmail (DOT) com> wrote:
Hi all!

I have a performance issue with a multiple tabs in a database. I want
to change the programming so that a tab is only populated if it become
active. I have successfully gotten a tab to stay blank until I
clicked on it, but I want it to populate when that tab becomes
active. How do I do that programmaticly?

Thanks in advance,
Laura

This is how I've done it, hope it makes sense

Select Case TabCtl157.Pages.Item(TabCtl157.Value).Name
Case "Tab1"
If Len([Child204].SourceObject) = 0 Or Me.Child204.SourceObject =
"zzzBlankFormForTabControl" Then
[Child204].SourceObject = "Call log_Archived Subform"
[Child204].LinkChildFields = "CUST_ID"
End If
Case "Tab2"
If Len([Child167].SourceObject) = 0 Or Me.Child167.SourceObject =
"zzzBlankFormForTabControl" Then
[Child167].SourceObject = "F-New Business Policy Type Subform"
[Child167].LinkChildFields = "CUST_ID"
End If
Case "Tab3"
If Len([F-Renewal Policy Type Subform].SourceObject) = 0 Or
Me.F_Renewal_Policy_Type_Subform.SourceObject =
"zzzBlankFormForTabControl" Then
[F-Renewal Policy Type Subform].SourceObject = "F-Renewal Policy
Type Subform"
[F-Renewal Policy Type Subform].LinkChildFields = "CUST_ID"
End If
Case "Tab4"
If Len([Child223].SourceObject) = 0 Or Me.Child223.SourceObject =
"zzzBlankFormForTabControl" Then
[Child223].SourceObject = "F-Endt subform"
[Child223].LinkChildFields = "CUST_ID"
End If
Case "Tab5"
If Len([F-Additional Code subform].SourceObject) = 0 Or
Me.F_Additional_Code_subform.SourceObject =
"zzzBlankFormForTabControl" Then
[F-Additional Code subform].SourceObject = "F-Additional Code
subform"
[F-Additional Code subform].LinkChildFields = "MSTR_AGCY_CD"
End If
Case "Tab6"
If Len([Child212].SourceObject) = 0 Or Me.Child212.SourceObject =
"zzzBlankFormForTabControl" Then
[Child212].SourceObject = "F-Certificates subform"
[Child212].LinkChildFields = "CUST_ID"
End If
Case "Tab7"
If Len([sbfrmAutoInfo].SourceObject) = 0 Or
Me.sbfrmAutoInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmAutoInfo].SourceObject = "sbfrmAutoInfo"
[sbfrmAutoInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab8"
If Len([sbfrmBopPackageInfo].SourceObject) = 0 Or
Me.sbfrmBopPackageInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmBopPackageInfo].SourceObject = "sbfrmBopPackageInfo"
[sbfrmBopPackageInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab9"
If Len([sbfrmWorkCompInfo].SourceObject) = 0 Or
Me.sbfrmWorkCompInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmWorkCompInfo].SourceObject = "sbfrmWorkCompInfo"
[sbfrmWorkCompInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab10"
If Len([sbfrmUmbrellaInfo].SourceObject) = 0 Or
Me.sbfrmUmbrellaInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmUmbrellaInfo].SourceObject = "sbfrmUmbrellaInfo"
[sbfrmUmbrellaInfo].LinkChildFields = "CUST_ID"
End If

End Select- Hide quoted text -

- Show quoted text -

each tab was tied to a different table(as you can see by the name of
each subform), the dummy subform had No record source so the subforms
of the tab control did not have to connect to the different tables
when the form was opened thus the form opened faster and function
quickier without having all the subform tables opened......... make
sense???

Reply With Quote
  #9  
Old   
bobh
 
Posts: n/a

Default Re: Sub-forms on tabs - 05-03-2010 , 11:22 AM



On Apr 30, 4:53*pm, "Lars Brownies" <L... (AT) Browniew (DOT) com> wrote:
Quote:
each tab was tied to a different table(as you can see by the name of
each subform), the dummy subform had No record source so the subforms
of the tab control did not have to connect to the different tables
when the form was opened thus the form opened faster and function
quickier without having all the subform tables opened......... *make
sense???

I understand the concept but I don't understand why you need the dummy form.
Why don't you just leave the SourceObject value blank?

Lars

"bobh" <vulca... (AT) yahoo (DOT) com> schreef in berichtnews:3289d994-7242-4178-b282-b27371fd76e0 (AT) x1g2000vbo (DOT) googlegroups.com...



On Apr 30, 2:05 pm, "Lars Brownies" <L... (AT) Browniew (DOT) com> wrote:
What is the reason for using a dummy form "zzzBlankFormForTabControl"?

Lars

"bobh" <vulca... (AT) yahoo (DOT) com> schreef in
berichtnews:4cebf6f4-9abd-4242-b835-14fc393af787 (AT) y12g2000vbg (DOT) googlegroups.com...

On Apr 29, 2:09 pm, musicloverlch <lho... (AT) gmail (DOT) com> wrote:
Hi all!

I have a performance issue with a multiple tabs in a database. I want
to change the programming so that a tab is only populated if it become
active. *I have successfully gotten a tab to stay blank until I
clicked on it, but I want it to populate when that tab becomes
active. *How do I do that programmaticly?

Thanks in advance,
Laura

This is how I've done it, hope it makes sense

* Select Case TabCtl157.Pages.Item(TabCtl157.Value).Name
* Case "Tab1"
* If Len([Child204].SourceObject) = 0 Or Me.Child204.SourceObject =
"zzzBlankFormForTabControl" Then
* [Child204].SourceObject = "Call log_Archived Subform"
* [Child204].LinkChildFields = "CUST_ID"
* End If
*Case "Tab2"
* *If Len([Child167].SourceObject) = 0 Or Me.Child167.SourceObject =
"zzzBlankFormForTabControl" Then
* *[Child167].SourceObject = "F-New Business Policy Type Subform"
* *[Child167].LinkChildFields = "CUST_ID"
* *End If
* *Case "Tab3"
* *If Len([F-Renewal Policy Type Subform].SourceObject) = 0 Or
Me.F_Renewal_Policy_Type_Subform.SourceObject =
"zzzBlankFormForTabControl" Then
* *[F-Renewal Policy Type Subform].SourceObject = "F-Renewal Policy
Type Subform"
* *[F-Renewal Policy Type Subform].LinkChildFields = "CUST_ID"
* *End If
*Case "Tab4"
* *If Len([Child223].SourceObject) = 0 Or Me.Child223.SourceObject =
"zzzBlankFormForTabControl" Then
* *[Child223].SourceObject = "F-Endt subform"
* *[Child223].LinkChildFields = "CUST_ID"
* *End If
*Case "Tab5"
* *If Len([F-Additional Code subform].SourceObject) = 0 Or
Me.F_Additional_Code_subform.SourceObject =
"zzzBlankFormForTabControl" Then
* *[F-Additional Code subform].SourceObject = "F-Additional Code
subform"
* *[F-Additional Code subform].LinkChildFields = "MSTR_AGCY_CD"
* *End If
* Case "Tab6"
* *If Len([Child212].SourceObject) = 0 Or Me.Child212.SourceObject =
"zzzBlankFormForTabControl" Then
* *[Child212].SourceObject = "F-Certificates subform"
* *[Child212].LinkChildFields = "CUST_ID"
* *End If
* *Case "Tab7"
* *If Len([sbfrmAutoInfo].SourceObject) = 0 Or
Me.sbfrmAutoInfo.SourceObject = "zzzBlankFormForTabControl" Then
* *[sbfrmAutoInfo].SourceObject = "sbfrmAutoInfo"
* *[sbfrmAutoInfo].LinkChildFields = "CUST_ID"
* *End If
* *Case "Tab8"
* *If Len([sbfrmBopPackageInfo].SourceObject) = 0 Or
Me.sbfrmBopPackageInfo.SourceObject = "zzzBlankFormForTabControl" Then
* *[sbfrmBopPackageInfo].SourceObject = "sbfrmBopPackageInfo"
* *[sbfrmBopPackageInfo].LinkChildFields = "CUST_ID"
* *End If
* *Case "Tab9"
* *If Len([sbfrmWorkCompInfo].SourceObject) = 0 Or
Me.sbfrmWorkCompInfo.SourceObject = "zzzBlankFormForTabControl" Then
* *[sbfrmWorkCompInfo].SourceObject = "sbfrmWorkCompInfo"
* *[sbfrmWorkCompInfo].LinkChildFields = "CUST_ID"
* *End If
* *Case "Tab10"
* *If Len([sbfrmUmbrellaInfo].SourceObject) = 0 Or
Me.sbfrmUmbrellaInfo.SourceObject = "zzzBlankFormForTabControl" Then
* *[sbfrmUmbrellaInfo].SourceObject = "sbfrmUmbrellaInfo"
* *[sbfrmUmbrellaInfo].LinkChildFields = "CUST_ID"
* *End If

* *End Select- Hide quoted text -

- Show quoted text -

each tab was tied to a different table(as you can see by the name of
each subform), the dummy subform had No record source so the subforms
of the tab control did not have to connect to the different tables
when the form was opened thus the form opened faster and function
quickier without having all the subform tables opened......... *make
sense???- Hide quoted text -

- Show quoted text -
most likely reason is because back 5 years ago when I did this, I
didn't think of/know any better to just leave the SourceObject value
blank.....
bobh.

Reply With Quote
  #10  
Old   
Lars Brownies
 
Posts: n/a

Default Re: Sub-forms on tabs - 05-03-2010 , 11:56 AM



Thanks for getting back.

Lars

"bobh" <vulcaned (AT) yahoo (DOT) com> schreef in bericht
news:1cf043bc-7782-473f-b5b3-17b24ab7c2b8 (AT) u21g2000vbr (DOT) googlegroups.com...
Quote:
On Apr 30, 4:53 pm, "Lars Brownies" <L... (AT) Browniew (DOT) com> wrote:
each tab was tied to a different table(as you can see by the name of
each subform), the dummy subform had No record source so the subforms
of the tab control did not have to connect to the different tables
when the form was opened thus the form opened faster and function
quickier without having all the subform tables opened......... make
sense???

I understand the concept but I don't understand why you need the dummy
form.
Why don't you just leave the SourceObject value blank?

Lars

"bobh" <vulca... (AT) yahoo (DOT) com> schreef in
berichtnews:3289d994-7242-4178-b282-b27371fd76e0 (AT) x1g2000vbo (DOT) googlegroups.com...



On Apr 30, 2:05 pm, "Lars Brownies" <L... (AT) Browniew (DOT) com> wrote:
What is the reason for using a dummy form "zzzBlankFormForTabControl"?

Lars

"bobh" <vulca... (AT) yahoo (DOT) com> schreef in
berichtnews:4cebf6f4-9abd-4242-b835-14fc393af787 (AT) y12g2000vbg (DOT) googlegroups.com...

On Apr 29, 2:09 pm, musicloverlch <lho... (AT) gmail (DOT) com> wrote:
Hi all!

I have a performance issue with a multiple tabs in a database. I
want
to change the programming so that a tab is only populated if it
become
active. I have successfully gotten a tab to stay blank until I
clicked on it, but I want it to populate when that tab becomes
active. How do I do that programmaticly?

Thanks in advance,
Laura

This is how I've done it, hope it makes sense

Select Case TabCtl157.Pages.Item(TabCtl157.Value).Name
Case "Tab1"
If Len([Child204].SourceObject) = 0 Or Me.Child204.SourceObject =
"zzzBlankFormForTabControl" Then
[Child204].SourceObject = "Call log_Archived Subform"
[Child204].LinkChildFields = "CUST_ID"
End If
Case "Tab2"
If Len([Child167].SourceObject) = 0 Or Me.Child167.SourceObject =
"zzzBlankFormForTabControl" Then
[Child167].SourceObject = "F-New Business Policy Type Subform"
[Child167].LinkChildFields = "CUST_ID"
End If
Case "Tab3"
If Len([F-Renewal Policy Type Subform].SourceObject) = 0 Or
Me.F_Renewal_Policy_Type_Subform.SourceObject =
"zzzBlankFormForTabControl" Then
[F-Renewal Policy Type Subform].SourceObject = "F-Renewal Policy
Type Subform"
[F-Renewal Policy Type Subform].LinkChildFields = "CUST_ID"
End If
Case "Tab4"
If Len([Child223].SourceObject) = 0 Or Me.Child223.SourceObject =
"zzzBlankFormForTabControl" Then
[Child223].SourceObject = "F-Endt subform"
[Child223].LinkChildFields = "CUST_ID"
End If
Case "Tab5"
If Len([F-Additional Code subform].SourceObject) = 0 Or
Me.F_Additional_Code_subform.SourceObject =
"zzzBlankFormForTabControl" Then
[F-Additional Code subform].SourceObject = "F-Additional Code
subform"
[F-Additional Code subform].LinkChildFields = "MSTR_AGCY_CD"
End If
Case "Tab6"
If Len([Child212].SourceObject) = 0 Or Me.Child212.SourceObject =
"zzzBlankFormForTabControl" Then
[Child212].SourceObject = "F-Certificates subform"
[Child212].LinkChildFields = "CUST_ID"
End If
Case "Tab7"
If Len([sbfrmAutoInfo].SourceObject) = 0 Or
Me.sbfrmAutoInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmAutoInfo].SourceObject = "sbfrmAutoInfo"
[sbfrmAutoInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab8"
If Len([sbfrmBopPackageInfo].SourceObject) = 0 Or
Me.sbfrmBopPackageInfo.SourceObject = "zzzBlankFormForTabControl"
Then
[sbfrmBopPackageInfo].SourceObject = "sbfrmBopPackageInfo"
[sbfrmBopPackageInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab9"
If Len([sbfrmWorkCompInfo].SourceObject) = 0 Or
Me.sbfrmWorkCompInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmWorkCompInfo].SourceObject = "sbfrmWorkCompInfo"
[sbfrmWorkCompInfo].LinkChildFields = "CUST_ID"
End If
Case "Tab10"
If Len([sbfrmUmbrellaInfo].SourceObject) = 0 Or
Me.sbfrmUmbrellaInfo.SourceObject = "zzzBlankFormForTabControl" Then
[sbfrmUmbrellaInfo].SourceObject = "sbfrmUmbrellaInfo"
[sbfrmUmbrellaInfo].LinkChildFields = "CUST_ID"
End If

End Select- Hide quoted text -

- Show quoted text -

each tab was tied to a different table(as you can see by the name of
each subform), the dummy subform had No record source so the subforms
of the tab control did not have to connect to the different tables
when the form was opened thus the form opened faster and function
quickier without having all the subform tables opened......... make
sense???- Hide quoted text -

- Show quoted text -

most likely reason is because back 5 years ago when I did this, I
didn't think of/know any better to just leave the SourceObject value
blank.....
bobh.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.