Do not display form until fully loaded

detrie

Registered User.
Local time
Today, 07:21
Joined
Feb 9, 2006
Messages
113
Access 2003

I have a rather complex form with an ODBC connection to data that takes some time to load.

The Form has a continuous subform I am using in place of a listbox to select records (I need more functionality than a listbox)

The Form's Record Source is a query

When the form opens, I does so in pieces as it populates

I'd like to either keep the form hidden until it completely loads


Thanks
 
The following procedure Opens Form1 in Normal View but in Hidden state. Next enters into a delay loop of 10 seconds that gives Form1 to complete it's action in memory and after which Form1 Object is selected from memory (rather than from Database Window) to make it visible:

Code:
Public Function HiddenForm()
Dim T
'Open the Form in Normal Mode, but in Hidden State
DoCmd.OpenForm "Form1", acNormal, , , , acHidden

'save the current timer value
T = Timer
Do While Timer < T + 10 'set a 10 seconds delay loop
  DoEvents
Loop
'10 seconds elapsed
'Make the Form visible by selecting it from memory
DoCmd.SelectObject acForm, "Form1", False

End Function
 

Users who are viewing this thread

Back
Top Bottom