A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Nee little help on tabs



 
 
Thread Tools Display Modes
  #1  
Old May 10th, 2010, 02:01 PM posted to microsoft.public.access.forms
Alain
external usenet poster
 
Posts: 65
Default Nee little help on tabs

Hi to all,

I do not know if anyone can help me on this one.
I have a form that contains a tab control with 15 tabs on it, tab 1 contains
approx 120 fields, half of them are calulated fields that are being updated
on the current event of the form thru a private sub.
On the tab control, I have 6 page with 1 subfrm on it, 2 pages with 4, 1
page with either 6,7 or 9 subfrm, very few subs are failry complex but most
of them contains less than 25 controls on them.
Loading the main form that have the tab control takes less than 1 sec. The
pages are program to be loaded on a per demand only,sample code I currently
use:

Case Me.pagProfile.PageIndex

Me.cmdHome.Visible = True
Me.Application.Echo False
Call Disconnect(intIndex)

If Len(subfrmBranchSignage.SourceObject) = 0 Then
subfrmBranchSignage.SourceObject = "subfrmBranchSignage"
subfrmBranchSignage.LinkChildFields = "IdBranch"
subfrmBranchOther.SourceObject = "subfrmBranchOther"
subfrmBranchOther.LinkChildFields = "IdBranch"
subfrmBranchAccess.SourceObject = "subfrmBranchAccess"
subfrmBranchAccess.LinkChildFields = "IdBranch"
subfrmBranchBarrier.SourceObject = "subfrmBranchBarrier"
subfrmBranchBarrier.LinkChildFields = "IdBranch"
subfrmBranchBasics.SourceObject = "subfrmBranchBasics"
subfrmBranchBasics.LinkChildFields = "IdBranch"
subfrmBranchElectrical.SourceObject = "subfrmBranchElectrical"
subfrmBranchElectrical.LinkChildFields = "IdBranch"
subfrmBranchConcept.SourceObject = "subfrmBranchConcept"
subfrmBranchConcept.LinkChildFields = "IdBranch"
Me.Application.Echo True
'reset variable for the next disconnect() call
intIndex = Me.pagProfile.PageIndex
End If

Private Sub DisconnectOptions()
'disconnect all objects in option page
If Len(frmRenewalOptions.SourceObject) 0 Then
frmRenewalOptions.SourceObject = ""
' frmRenewalOptions.LinkChildFields = "IdBranch"
frmExpansionRights.SourceObject = ""
' frmExpansionRights.LinkChildFields = "IdBranch"
frmCancellationRights.SourceObject = ""
' frmCancellationRights.LinkChildFields = "IdBranch"
frmRefusalRights.SourceObject = ""
' frmRefusalRights.LinkChildFields = "IdBranch"
End If
End Sub
the commented lines generate problems.

The main problem is when I load a new tab, the controls in them are turning
white while waiting to painted, (just imagine seeing your screen changing
line per line of pixel), this loading can take up to 3 secs.
Is there anything that can be done to improve this process, the white boxes
thing ??
My back end is on a network and just had it tested today regaring the so
call updating delay, I am currently waiting for the detailled report but from
the first look at it, it will not be the problem
My back end contains approx 150 tables broken down to respect as much as
possible normalization.
I currently use intel 3.4 Ghtz CPU, 2gig or RAM and XP Pro with Access 2007.

Many thanks

  #2  
Old May 10th, 2010, 02:30 PM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Nee little help on tabs

Do you really need all the tabs loaded at once?

If not, you could shrink to tab control so it has no real height below the
tabs, and place just one subform control directly on the form below that
(i.e. it's NOT on a page of the tab control.) Then respond to the tab
control's Change event by loading the appropriate tab sourceobject into the
subform control.

The example below assumes:
- a tab control named tabMain
- subform control named fsubGeneric
Then put the form name into the Tag property of each tab page, and set up
the tab control's Change event procedure like this:

Private Sub tabMain_Change()
With Me.tabMain.Pages(Me.tabMain.Value)
If .Tag vbNullString Then
Me.fsubGeneric.SourceObject = .Tag
Else
MsgBox "Page " & .Name & " has no Tag."
End If
End With
End Sub

If you still have significant delay you can suppress the visual mess with
DoCmd.Echo False
making sure it turn it on again in the error exit section (so it still comes
back on even after an error.)

--
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.


"Alain" wrote in message
...
Hi to all,

I do not know if anyone can help me on this one.
I have a form that contains a tab control with 15 tabs on it, tab 1
contains
approx 120 fields, half of them are calulated fields that are being
updated
on the current event of the form thru a private sub.
On the tab control, I have 6 page with 1 subfrm on it, 2 pages with 4, 1
page with either 6,7 or 9 subfrm, very few subs are failry complex but
most
of them contains less than 25 controls on them.
Loading the main form that have the tab control takes less than 1 sec. The
pages are program to be loaded on a per demand only,sample code I
currently
use:

Case Me.pagProfile.PageIndex

Me.cmdHome.Visible = True
Me.Application.Echo False
Call Disconnect(intIndex)

If Len(subfrmBranchSignage.SourceObject) = 0 Then
subfrmBranchSignage.SourceObject = "subfrmBranchSignage"
subfrmBranchSignage.LinkChildFields = "IdBranch"
subfrmBranchOther.SourceObject = "subfrmBranchOther"
subfrmBranchOther.LinkChildFields = "IdBranch"
subfrmBranchAccess.SourceObject = "subfrmBranchAccess"
subfrmBranchAccess.LinkChildFields = "IdBranch"
subfrmBranchBarrier.SourceObject = "subfrmBranchBarrier"
subfrmBranchBarrier.LinkChildFields = "IdBranch"
subfrmBranchBasics.SourceObject = "subfrmBranchBasics"
subfrmBranchBasics.LinkChildFields = "IdBranch"
subfrmBranchElectrical.SourceObject = "subfrmBranchElectrical"
subfrmBranchElectrical.LinkChildFields = "IdBranch"
subfrmBranchConcept.SourceObject = "subfrmBranchConcept"
subfrmBranchConcept.LinkChildFields = "IdBranch"
Me.Application.Echo True
'reset variable for the next disconnect() call
intIndex = Me.pagProfile.PageIndex
End If

Private Sub DisconnectOptions()
'disconnect all objects in option page
If Len(frmRenewalOptions.SourceObject) 0 Then
frmRenewalOptions.SourceObject = ""
' frmRenewalOptions.LinkChildFields = "IdBranch"
frmExpansionRights.SourceObject = ""
' frmExpansionRights.LinkChildFields = "IdBranch"
frmCancellationRights.SourceObject = ""
' frmCancellationRights.LinkChildFields = "IdBranch"
frmRefusalRights.SourceObject = ""
' frmRefusalRights.LinkChildFields = "IdBranch"
End If
End Sub
the commented lines generate problems.

The main problem is when I load a new tab, the controls in them are
turning
white while waiting to painted, (just imagine seeing your screen changing
line per line of pixel), this loading can take up to 3 secs.
Is there anything that can be done to improve this process, the white
boxes
thing ??
My back end is on a network and just had it tested today regaring the so
call updating delay, I am currently waiting for the detailled report but
from
the first look at it, it will not be the problem
My back end contains approx 150 tables broken down to respect as much as
possible normalization.
I currently use intel 3.4 Ghtz CPU, 2gig or RAM and XP Pro with Access
2007.

Many thanks

  #3  
Old May 10th, 2010, 02:37 PM posted to microsoft.public.access.forms
Daniel Pineault
external usenet poster
 
Posts: 658
Default Nee little help on tabs

Do you have a persistent connection to your back-end?
Do your sub-form Recodsources limit the returned records to only those that
match the selected record in the main form using a WHERE clause in the SQL
statement?
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"Alain" wrote:

Hi to all,

I do not know if anyone can help me on this one.
I have a form that contains a tab control with 15 tabs on it, tab 1 contains
approx 120 fields, half of them are calulated fields that are being updated
on the current event of the form thru a private sub.
On the tab control, I have 6 page with 1 subfrm on it, 2 pages with 4, 1
page with either 6,7 or 9 subfrm, very few subs are failry complex but most
of them contains less than 25 controls on them.
Loading the main form that have the tab control takes less than 1 sec. The
pages are program to be loaded on a per demand only,sample code I currently
use:

Case Me.pagProfile.PageIndex

Me.cmdHome.Visible = True
Me.Application.Echo False
Call Disconnect(intIndex)

If Len(subfrmBranchSignage.SourceObject) = 0 Then
subfrmBranchSignage.SourceObject = "subfrmBranchSignage"
subfrmBranchSignage.LinkChildFields = "IdBranch"
subfrmBranchOther.SourceObject = "subfrmBranchOther"
subfrmBranchOther.LinkChildFields = "IdBranch"
subfrmBranchAccess.SourceObject = "subfrmBranchAccess"
subfrmBranchAccess.LinkChildFields = "IdBranch"
subfrmBranchBarrier.SourceObject = "subfrmBranchBarrier"
subfrmBranchBarrier.LinkChildFields = "IdBranch"
subfrmBranchBasics.SourceObject = "subfrmBranchBasics"
subfrmBranchBasics.LinkChildFields = "IdBranch"
subfrmBranchElectrical.SourceObject = "subfrmBranchElectrical"
subfrmBranchElectrical.LinkChildFields = "IdBranch"
subfrmBranchConcept.SourceObject = "subfrmBranchConcept"
subfrmBranchConcept.LinkChildFields = "IdBranch"
Me.Application.Echo True
'reset variable for the next disconnect() call
intIndex = Me.pagProfile.PageIndex
End If

Private Sub DisconnectOptions()
'disconnect all objects in option page
If Len(frmRenewalOptions.SourceObject) 0 Then
frmRenewalOptions.SourceObject = ""
' frmRenewalOptions.LinkChildFields = "IdBranch"
frmExpansionRights.SourceObject = ""
' frmExpansionRights.LinkChildFields = "IdBranch"
frmCancellationRights.SourceObject = ""
' frmCancellationRights.LinkChildFields = "IdBranch"
frmRefusalRights.SourceObject = ""
' frmRefusalRights.LinkChildFields = "IdBranch"
End If
End Sub
the commented lines generate problems.

The main problem is when I load a new tab, the controls in them are turning
white while waiting to painted, (just imagine seeing your screen changing
line per line of pixel), this loading can take up to 3 secs.
Is there anything that can be done to improve this process, the white boxes
thing ??
My back end is on a network and just had it tested today regaring the so
call updating delay, I am currently waiting for the detailled report but from
the first look at it, it will not be the problem
My back end contains approx 150 tables broken down to respect as much as
possible normalization.
I currently use intel 3.4 Ghtz CPU, 2gig or RAM and XP Pro with Access 2007.

Many thanks

  #4  
Old May 10th, 2010, 03:49 PM posted to microsoft.public.access.forms
Alain
external usenet poster
 
Posts: 65
Default Nee little help on tabs

Hi Daniel,

my persistent connection is directly related to my tab1, it is the only one
that I never disconnect. The client request need to have all recordset loaded
when a specific tab is selected since the client will need to do a search
thru all his recordset from that page, although the search cbo is on the form
header, I might be able to to do something about this, will need to test if
feasable
Thanks

"Daniel Pineault" wrote:

Do you have a persistent connection to your back-end?
Do your sub-form Recodsources limit the returned records to only those that
match the selected record in the main form using a WHERE clause in the SQL
statement?
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"Alain" wrote:

Hi to all,

I do not know if anyone can help me on this one.
I have a form that contains a tab control with 15 tabs on it, tab 1 contains
approx 120 fields, half of them are calulated fields that are being updated
on the current event of the form thru a private sub.
On the tab control, I have 6 page with 1 subfrm on it, 2 pages with 4, 1
page with either 6,7 or 9 subfrm, very few subs are failry complex but most
of them contains less than 25 controls on them.
Loading the main form that have the tab control takes less than 1 sec. The
pages are program to be loaded on a per demand only,sample code I currently
use:

Case Me.pagProfile.PageIndex

Me.cmdHome.Visible = True
Me.Application.Echo False
Call Disconnect(intIndex)

If Len(subfrmBranchSignage.SourceObject) = 0 Then
subfrmBranchSignage.SourceObject = "subfrmBranchSignage"
subfrmBranchSignage.LinkChildFields = "IdBranch"
subfrmBranchOther.SourceObject = "subfrmBranchOther"
subfrmBranchOther.LinkChildFields = "IdBranch"
subfrmBranchAccess.SourceObject = "subfrmBranchAccess"
subfrmBranchAccess.LinkChildFields = "IdBranch"
subfrmBranchBarrier.SourceObject = "subfrmBranchBarrier"
subfrmBranchBarrier.LinkChildFields = "IdBranch"
subfrmBranchBasics.SourceObject = "subfrmBranchBasics"
subfrmBranchBasics.LinkChildFields = "IdBranch"
subfrmBranchElectrical.SourceObject = "subfrmBranchElectrical"
subfrmBranchElectrical.LinkChildFields = "IdBranch"
subfrmBranchConcept.SourceObject = "subfrmBranchConcept"
subfrmBranchConcept.LinkChildFields = "IdBranch"
Me.Application.Echo True
'reset variable for the next disconnect() call
intIndex = Me.pagProfile.PageIndex
End If

Private Sub DisconnectOptions()
'disconnect all objects in option page
If Len(frmRenewalOptions.SourceObject) 0 Then
frmRenewalOptions.SourceObject = ""
' frmRenewalOptions.LinkChildFields = "IdBranch"
frmExpansionRights.SourceObject = ""
' frmExpansionRights.LinkChildFields = "IdBranch"
frmCancellationRights.SourceObject = ""
' frmCancellationRights.LinkChildFields = "IdBranch"
frmRefusalRights.SourceObject = ""
' frmRefusalRights.LinkChildFields = "IdBranch"
End If
End Sub
the commented lines generate problems.

The main problem is when I load a new tab, the controls in them are turning
white while waiting to painted, (just imagine seeing your screen changing
line per line of pixel), this loading can take up to 3 secs.
Is there anything that can be done to improve this process, the white boxes
thing ??
My back end is on a network and just had it tested today regaring the so
call updating delay, I am currently waiting for the detailled report but from
the first look at it, it will not be the problem
My back end contains approx 150 tables broken down to respect as much as
possible normalization.
I currently use intel 3.4 Ghtz CPU, 2gig or RAM and XP Pro with Access 2007.

Many thanks

  #5  
Old May 10th, 2010, 04:00 PM posted to microsoft.public.access.forms
Alain
external usenet poster
 
Posts: 65
Default Nee little help on tabs

Hi Allen,

if I understand you correctly, I should have a tab control of small size
with a subform underneath that tab, the information loaded thru that subform
will be based on the tab tag therefore ending up with 1 main form and
multiple subforms being loaded on demand ?
Very interesting, I will need to find some time to teest this one out, sadly
running out of time so I am modifying to an older desing.

Thanks

"Allen Browne" wrote:

Do you really need all the tabs loaded at once?

If not, you could shrink to tab control so it has no real height below the
tabs, and place just one subform control directly on the form below that
(i.e. it's NOT on a page of the tab control.) Then respond to the tab
control's Change event by loading the appropriate tab sourceobject into the
subform control.

The example below assumes:
- a tab control named tabMain
- subform control named fsubGeneric
Then put the form name into the Tag property of each tab page, and set up
the tab control's Change event procedure like this:

Private Sub tabMain_Change()
With Me.tabMain.Pages(Me.tabMain.Value)
If .Tag vbNullString Then
Me.fsubGeneric.SourceObject = .Tag
Else
MsgBox "Page " & .Name & " has no Tag."
End If
End With
End Sub

If you still have significant delay you can suppress the visual mess with
DoCmd.Echo False
making sure it turn it on again in the error exit section (so it still comes
back on even after an error.)

--
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.


"Alain" wrote in message
...
Hi to all,

I do not know if anyone can help me on this one.
I have a form that contains a tab control with 15 tabs on it, tab 1
contains
approx 120 fields, half of them are calulated fields that are being
updated
on the current event of the form thru a private sub.
On the tab control, I have 6 page with 1 subfrm on it, 2 pages with 4, 1
page with either 6,7 or 9 subfrm, very few subs are failry complex but
most
of them contains less than 25 controls on them.
Loading the main form that have the tab control takes less than 1 sec. The
pages are program to be loaded on a per demand only,sample code I
currently
use:

Case Me.pagProfile.PageIndex

Me.cmdHome.Visible = True
Me.Application.Echo False
Call Disconnect(intIndex)

If Len(subfrmBranchSignage.SourceObject) = 0 Then
subfrmBranchSignage.SourceObject = "subfrmBranchSignage"
subfrmBranchSignage.LinkChildFields = "IdBranch"
subfrmBranchOther.SourceObject = "subfrmBranchOther"
subfrmBranchOther.LinkChildFields = "IdBranch"
subfrmBranchAccess.SourceObject = "subfrmBranchAccess"
subfrmBranchAccess.LinkChildFields = "IdBranch"
subfrmBranchBarrier.SourceObject = "subfrmBranchBarrier"
subfrmBranchBarrier.LinkChildFields = "IdBranch"
subfrmBranchBasics.SourceObject = "subfrmBranchBasics"
subfrmBranchBasics.LinkChildFields = "IdBranch"
subfrmBranchElectrical.SourceObject = "subfrmBranchElectrical"
subfrmBranchElectrical.LinkChildFields = "IdBranch"
subfrmBranchConcept.SourceObject = "subfrmBranchConcept"
subfrmBranchConcept.LinkChildFields = "IdBranch"
Me.Application.Echo True
'reset variable for the next disconnect() call
intIndex = Me.pagProfile.PageIndex
End If

Private Sub DisconnectOptions()
'disconnect all objects in option page
If Len(frmRenewalOptions.SourceObject) 0 Then
frmRenewalOptions.SourceObject = ""
' frmRenewalOptions.LinkChildFields = "IdBranch"
frmExpansionRights.SourceObject = ""
' frmExpansionRights.LinkChildFields = "IdBranch"
frmCancellationRights.SourceObject = ""
' frmCancellationRights.LinkChildFields = "IdBranch"
frmRefusalRights.SourceObject = ""
' frmRefusalRights.LinkChildFields = "IdBranch"
End If
End Sub
the commented lines generate problems.

The main problem is when I load a new tab, the controls in them are
turning
white while waiting to painted, (just imagine seeing your screen changing
line per line of pixel), this loading can take up to 3 secs.
Is there anything that can be done to improve this process, the white
boxes
thing ??
My back end is on a network and just had it tested today regaring the so
call updating delay, I am currently waiting for the detailled report but
from
the first look at it, it will not be the problem
My back end contains approx 150 tables broken down to respect as much as
possible normalization.
I currently use intel 3.4 Ghtz CPU, 2gig or RAM and XP Pro with Access
2007.

Many thanks

.

 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.