Form Load efficiency

When an SSTab control resides on the form is it more efficient to:

1)  Load all controls during Form Load

or

2) Load only the controls for the tab showing on the SSTab and
    then dynamically load any other SSTab when selected.



0
David
1/19/2010 8:30:52 PM
vb.general.discussion 1016 articles. 0 followers. Follow

3 Replies
968 Views

Similar Articles

[PageSpeed] 58

David wrote:
> When an SSTab control resides on the form is it more efficient to:
>
> 1)  Load all controls during Form Load
>
> or
>
> 2) Load only the controls for the tab showing on the SSTab and
>     then dynamically load any other SSTab when selected.

You will have to try it and see. You can make thought-experiments, but I've
found different situations and contexts can make an expected difference.

If some of the Tabs are seldom selected, you may find in practice that #2 is
more efficient.

Also if the load times are appreciable, note that users tend to be more
tolerant of a 'slow' loading form (with some kind of visual - splash screen,
loading message, etc) than they are of a 'slow' reacting control.

-ralph


0
Ralph
1/19/2010 10:47:22 PM

"David" <dw85745NOT@earthlink.net> wrote in message 
news:OKHEMZUmKHA.5520@TK2MSFTNGP06.phx.gbl...
> When an SSTab control resides on the form is it more efficient to:
>
> 1)  Load all controls during Form Load
>
> or
>
> 2) Load only the controls for the tab showing on the SSTab and
>    then dynamically load any other SSTab when selected.

There's a loaded question. <g>

Trade-offs either way. First, let's clear up what you mean by loading 
controls. Do you mean loading controls that are part of control arrays? Or 
do you mean loading data into controls perhaps from a database?

If you load all these controls (be it loading controls in a control array or 
loading data into controls) at once in Form_Load (or elsewhere), your app 
may take a little longer to load, but changing from tab to tab will be 
quicker (IOW, your app will be more responsive once everything's loaded). 
If you load them as each tab is selected, then displaying that tab will take 
longer, but the app itself will initially load quicker. Personally, I'd go 
for the former and display a splash screen while all this loading is 
occurring.

You'd undoubtedly get better answers and assistance if you provide more 
details because "loading controls" is a little bit ambiguous.

-- 
Mike
 

0
MikeD
1/19/2010 10:58:08 PM
Thanks Ralph and MikeD.

Questioned whether to even post this as figured it would be "depends"
-- and not the kind you wear when you get older :>).

In this case I'm giving the user the option to select a TimeZone on one of 
the tabs.  This option along with others on this tab, IMHO will be used 
rarely once set.  So tradeoff is load the combo with values at Form_Load or 
just put in the last value and hold off loading combo
until tab selected.

No response necessary.

Have a nice day.

David



"MikeD" <nobody@nowhere.edu> wrote in message 
news:%23zmjgrVmKHA.3792@TK2MSFTNGP02.phx.gbl...
>
>
> "David" <dw85745NOT@earthlink.net> wrote in message 
> news:OKHEMZUmKHA.5520@TK2MSFTNGP06.phx.gbl...
>> When an SSTab control resides on the form is it more efficient to:
>>
>> 1)  Load all controls during Form Load
>>
>> or
>>
>> 2) Load only the controls for the tab showing on the SSTab and
>>    then dynamically load any other SSTab when selected.
>
> There's a loaded question. <g>
>
> Trade-offs either way. First, let's clear up what you mean by loading 
> controls. Do you mean loading controls that are part of control arrays? Or 
> do you mean loading data into controls perhaps from a database?
>
> If you load all these controls (be it loading controls in a control array 
> or loading data into controls) at once in Form_Load (or elsewhere), your 
> app may take a little longer to load, but changing from tab to tab will be 
> quicker (IOW, your app will be more responsive once everything's loaded). 
> If you load them as each tab is selected, then displaying that tab will 
> take longer, but the app itself will initially load quicker. Personally, 
> I'd go for the former and display a splash screen while all this loading 
> is occurring.
>
> You'd undoubtedly get better answers and assistance if you provide more 
> details because "loading controls" is a little bit ambiguous.
>
> -- 
> Mike
>
> 


0
David
1/20/2010 2:05:39 AM
Reply:

Similar Artilces:

Creating a form for a Password
I have created a Password form that will secure another form. Once the password is entered it will open the form that has the list of reports. On the form I have a text box that accepts the user's password and I have 2 command buttons one is OK and the other is CANCEL. Can anyone tell me how to make these buttons work to open the form of reports? On Wed, 10 Oct 2007 13:52:00 -0700, mrsgwen wrote: > I have created a Password form that will secure another form. Once the > password is entered it will open the form that has the list of reports. On > the form I have a text b...

Search Form 11-19-09
I have created a search form that has unbound text boxes to search the database. There are fields for SSN's, FEIN's and a permit number. When I search on any of these numbers I get multiple records even though these records are all unique? Any pointers will help, I wish I could load the database here. thanks On Nov 20, 8:54=A0am, Dave <davidstev...@gmail.com> wrote: > I have created a search form that has unbound text boxes to search the > database. There are fields for SSN's, FEIN's and =A0a permit number. > When I search on any of these numbers I...

Report can't print form field
My report heading contains a text box with the following data source: ="Transactions since " & Forms!frmPrintTran!txtDate The on-screen preview shows the date fine, but on printing, this textbox displays #Name? The form remains open during print. Happens with both Access 2002 and 2007, DB structure A2000. What gives here? Thanks. -- TedMi This usually happens when there is code in the On Close of the report that closes the form. -- Duane Hookom Microsoft Access MVP "tedmi" wrote: > My report heading contains a text box with the following data source: > ...

Forms Check Box cell link
Excel 2003 I am using a check box created with the Forms menu. I created a box over cell D4. Using the Format Control box, I linked the check box to cell D4. I want to copy the check box in cell D5, D6, D7,.... and I want the cell link to integrate in the same mannor; check box in cell D5 should link to cell D5, and so on. Is there a way to accomplish this short of going into the format control box and manually editing each cell link after I have copy and pasted several check boxes? I have NOT entered the link using an absolute cell referense. I got the idea for this from Dav...

Customizing Forms Wizard
It is possible to control or customize details of the way the wizards creates objects? For instance, we have internal naming standards for controls and I would like the wizard to name each control according to our standard. I know I can use a form template for the forms created without wizards, but what about controlling the creation of the ones done via wizards too? Thanks in advance, See if this helps: http://support.microsoft.com/kb/151218/EN-US/ Román Valoria wrote: >It is possible to control or customize details of the way the wizards creates >objects? > >For ...

Form Menu : Check Box
I am trying to enter 300 or so check boxes onto and Excel spreadsheet. I find that I can link the 'return' cell using the right click / Forma Control / Control tab / Cell Link option but I need to do this for eac box ! Is there a way around this ? Whereby I can create one Check Box an then drag or copy it down -- jagstirlin ----------------------------------------------------------------------- jagstirling's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=110 View this thread: http://www.excelforum.com/showthread.php?threadid=50634 Maybe you could jus...

Access-Forms-VB links
After years in software development/database programming mostly on Unix/Oracle I'm tasked to change some Access forms to use redesigned tables. I'm having trouble with the relationship between forms and VB. For example I'm looking at some VB code that frequently references the Me class which I assume to be the default reference to the current (form) class (like this in C++), but I can't see how/where the class is actually defined. Can someone please provide some links that provide concise explanations of the relationship between Access and VB. My googling has only turned up pag...

can a form display current table field names?
Hello, I need to create a form that will display the current field names resulting from a make-table querythat can change from audit to audit. This way the user is always aware of the "current" field names in their dataset. Currently, a form displays the structure from a linked (text formt) table that I have to manually export every time the make-table query changes and I'd like this to be generated from a macro or from code. Any Ideas? I thank you, John_Lehmus Maine, USA This article illustrates how you can list the field names, types, and descriptions for a table: ...

Sinking MS Access form events from MFC console app
Hi All, I'm trying to sink MS Access form events using technique described in <<HOW TO: Handle Events for Excel by Using Visual C++ .NET (http://www.kbalertz.com/Q309301/Handle.Events.Excel.Using.Visual.aspx)>> Of course I did do all the needed code substitutions etc. All works rather well, I mean I'm getting to MS Access form IConnectionPointContainer etc. But the last code line - hr = m_pConnectionPoint->Advise(m_pAppEventListener,&m_dwConnectionCookie); doesn't work and returns hr = -2147220990. Here is MS Access form events interface ID I use: const II...

Slow load of first node, xmltextreader
Hi! I have a problem with reading a xmlfile from a url. I am confused by the long loading time of the first node. When the first node has been loaded, the rest of the nodes is parsed very fast. I am on a c# 2003 environment. The url returns an xml of appr 80 kB. It takes 1,5 seconds from first,start to first, stop. It takes appr. 0,5 seconds to generate the xml on the remote host. I'll be very happy for any assistance on this! /fredrik // Gets the xml from the Url using XmlTextReader Trace.Write("init reader","start"); XmlTextReader reader = new XmlTextReader(sea...

Linking Form and Report
Good evening, I have a Main Entry Form for the entry of installation data. I have a Report set up to be used as an Audit tool. I would like to have the Audit Report pop up for review when the Save & Close button is depressed. The Form and the Report are linked by Folio No, unfortunately I have not been successful, when you push the Save & Close the form opens but its blank. I have checked the underlying tables and the data seems to be there. Is there something unusual about trying to attach a Report to a Form at all. Private Sub btnSaveRecord_Click() On Error GoTo Err_btnSa...

Passing Values between forms
I am trying to link to forms. I have a button on the main form (frmCompanies) that needs to open another form when a button is clicked. The new form that opens is frmScheduledActivities. When it open it needs to check to see if there is an existing record (scheduled activity) for the company and if there is no scheduled activity be set to add a new record. When the button is clicked on the main company form (on the on click event) this code runs: Private Sub cmdCallBack_Click() On Error GoTo Err_cmdCallBack_Click Dim stDocName As String Dim stLinkCriteria As String...

Display Query from form in Foreground
I have a form upon which the user selects display, filter and sort fields. He then clics the submit button and a query is built and then displayed with the following code: DoCmd.OpenQuery "Queryname", acNormal, acEdit The query works but shows up in the background and cant be clicked on until the form is closed. The idea was to create a form on which the user could do adhoc queries until he gets it right and then click another button to do the Excel extract. Is there a way to show the query in the foreground? On Tue, 22 Jan 2008 17:54:27 -0800, rmcompute wrote: > I ha...

Return Value from Form
I need to return a value from a form displayed modally. Many years ago, if I used VB classic, I could create a public method that took care of any arguments, displayed the form modally, and then returned appropriate return values. Something like this: Public Function GetValue(Args As Integer m_Args = Args m_Result = DefaultResult Show vbModal GetValue = m_Result End Function However, it appears Access VBA doesn't support this. For one thing, there's no Show method (and so it certainly can't have a modal argument). I like this approach because ...

User Form Security Question
Hi, I'm creating a form, which onces completed transfers the data over to the spreadsheet. But the guys in work don't really pay much attention to what they have entered , so i was wondering is there any way to make the user double check every entry? I was thinking, once the user clicks ok, a msgbox would appear giving the user the value they entered, click ok if correct or cancel to amend. Is there a easy way to do this? Cheers. -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/mem...

I did do an update today form Microsofts update page #2
If I can remember correctly, it was 2 new items that came out today for the OS. Could that have casued this. But it worked Ok afterwards. Nothing else installed in the last week. ...

Loading Great Plains on Citrix
Is it feasible to load more than one instance of Great Plains on a Citrix Server? So that: First Company C:Program Files/Microsoft Business Solutions/Company1/Great Plains/ Second Company C:Program Files/Microsoft Business Solutions/Company2/Great Plains/ This is recommended if each company uses different mod forms and reports: But if this to point to company a or b - you can configure this with Great Plains security for which users can access what company when loggin into GP. Regards James "Tremor Olaes" <TremorOlaes@discussions.microsoft.com> wrote in messa...

Excel template to load automatically as the default template?
Is there anyway to set an Excel template to load as the default template. Place it in your XL Start folder. HTH Jason Atlanta, GA >-----Original Message----- >Is there anyway to set an Excel template to load as the default template. >. > ...

How to I stop the form from resetting
I have a table linked to the header of my form. The table has for records. Here's what happens. When I choose a record (say record 3) record 1 ALWAYS prints. The form is meant to be printed out. Can someon please tell me how I can get the record I choose to print out? Thanks in advance!! :o) Although it is possible to print a form, it is not advised. You will get better results if you create a report and print the report. -- Dave Hargis, Microsoft Access MVP "Printing only filtered data in a form" wrote: > I have a table linked to the header of my form. The table h...

Pass Through query with criteria on a form
I have a Pass Through query that looks like this. select Location,City,State,Country,Pings from (select sd_term_name_loc as 'Location', sd_term_city as 'City', sd_term_st as 'State', sd_term_cntry as 'Country', count(sd_key)as 'Pings' from detail (nolock) where -- ***** The dates below refer to the date and time at which the transaction was loaded to PRM. -- ***** -- ***** The number of pings which have occurred BETWEEN those dates/times will be counted. -- ***** -- ***** Enter the date/time in the format '09/16/2007 14:00:00.000...

issue with serial port on module, updating form
Hello, Ive created a serial port instance on a module. In the same module I have the sub data_received. Now I'd like to update a control in a form, how can I do it? Thanks in advance You need to use Control.BeginInvoke or .Invoke to update the UI via a Delegate. You can download the VB2005 Terminal example from my website, which illustrates this. Dick -- Richard Grier, Consultant, Hard & Software 12962 West Louisiana Avenue Lakewood, CO 80228 303-986-2179 (voice) Homepage: www.hardandsoftware.net Author of Visual Basic Programmer's Guide to Serial Comm...

How can I put photos in Microsoft Access Form
I used the information BobLarson said in putting photos in Microsoft Access Form but it's not working. My computer keeps asking for Form1, which I deleted because nothing was happening the way I wanted it to. What I would like to know is there a online video that can show how you can do this procedure. And how can I get my computer stop asking for Form1. "Helen" <Helen@discussions.microsoft.com> wrote in message news:8E015B36-D605-428D-9275-C95DAC1DC3AE@microsoft.com... >I used the information BobLarson said in putting photos in Microsoft Access > For...

This form Requires Word
Thanks gang, I am reasonably up to snuff on Outlook and have used it for as long as it has been around. I am running Windows 2k Pro and Office 2k Pro and Outlook is configured to use Word as the default email editor. It does so quiet well both composing and reading email, except when email is receives from one particular person, one out of hundreds. This lady <the sender> is also using Outlook 2k pro and windows 2k pro and word as default editor. When I receive mail from her and try to open it I receive the message "This form requires Word as your email editor, but Word is eith...

Queue info slow to load
We're using two front-end gateway servers that route email to and from the Internet, and also to internal routing and admin groups (a "hub and spoke" topology). They're more or less identical and are setup to load balance email traffic. Both are Ex2k3 on Win2k3 with all the latest service packs and updates. The back-end environment is Ex2k/Ex2k3 mixed mode. When i look at the queues for either front-end server by going through their local Exchange Administrator, one server takes a loooong time to load (a minute or more), while the other one loads the same informatio...

Multiple Record Inputs with one Form
I'm programming with SQL and can't seem how to figure out how to send more than one record to the table with one form. You've described a "how" ... as in how you are trying to do something ("send more than one record to the table with one form"). Now, "why" ... as in what will having multiple records generated from a single form allow you to do (i.e., business need)? This isn't idle curiosity ... if we knew more about the underlying business need, we might be able to offer alternate approaches. Regards Jeff Boyce Microsoft Office/Access ...