Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visible/invisible controls vs speed

Status
Not open for further replies.

shar

Technical User
Apr 2, 2000
54
IR
I have a form with a dozen tabs, one for each child table (all are 1->many to parent). The application is running over a network. Now the app speed is barely acceptable.

Would making the tabs invisible reduces the query calls to the application and therefore increases the record to record moving speed?

I was thinking of having a button to make the tabs visible if the user wants to see the info, otherwise keep them invisible.

Thanks.
Shar

 
Are you sure the form with the tabs is what is causing the problem?
Is it possible to rename the page and sub in another blank page to see if the tab'ed page is the real issue.
I am curious, I have a form with 40 tabs and numerous performance issues I am working through.
 
There are combo boxes text boxes on the tabs which require data. Also, each tab which represents a table has a query for its source data. So I am assuming on arrival to each record, these tabs would send in their queries to the server to update their data.

Also, when the number of controls with updatable data goes up in the form the speed decreases. Recently, I had to remove lookup fields on one of the tabs, because right after its installation, the speed was so bad, everyone was complaining.

If invisible tabs do not sent in requests for data, it has to speed things up.
 
If your lookup uses the DCount or IIF statements, you might want to follow up in the online help concerning the cautions on using these. They are very slow.
Make sure the queries that populate your combos refer to indexed fields. Running queries on un-indexed fields will also slow down the response of the Jet to the sql.
 
I had a similar problem, in this case a "me.refresh" was the troublemaker because this statement did a requery of all combos and all sub forms. An improvement was this code to only refresh the active tab.

Private Sub Form_Current()
' call RefreshActiveTab instead of me.refresh
RefreshActiveTab Me.TabCtl0
End Sub
Function RefreshActiveTab(SelectedTabControl As TabControl)
Dim ActiveTabPage As Page
Dim ControlCounter As Integer

Set ActiveTabPage = ActiveTab(SelectedTabControl)
For ControlCounter = 0 To ActiveTabPage.Controls.Count - 1
If (TypeOf ActiveTabPage.Controls(ControlCounter) Is ListBox) Or _
(TypeOf ActiveTabPage.Controls(ControlCounter) Is ComboBox) Then
ActiveTabPage.Controls(ControlCounter).Requery
End If
Next
End Function
Function ActiveTab(SelectedTabControl As TabControl) As Page
Set ActiveTab = SelectedTabControl.Pages(SelectedTabControl.value)
End Function
 
Even if you do not refresh manually or on event, all the queries get requeried when you move to a new record.

My problem is slow form w/o manual refresh.

I need to know if this requery happens when a control is invisible.

Thanks.
 
I think you can test this with a subform on an invisible tab, when you place a msgbox in the OnCurrent event of the subform it pops up on a requery.
 
FYI:

Did the test, it gets requeried even when it is invisible.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top