Form - wait until fully loaded before visible

Jaye7

Registered User.
Local time
Today, 13:13
Joined
Aug 19, 2014
Messages
205
I have tried using a timer event to not show a form until it is fully loaded, to no avail.

Code:
If CurrentProject.AllForms("FONNewEdit").IsLoaded = True Then
  Me.Visible = True
  Me.TimerInterval = 0
End If

I have tried using the onload, onopen but the form still displays before being fully loaded.
 
Define Fully loaded. The way access decides if the form is loaded is when all controls of the form and its data source is loaded. Not when all calculations are made and displayed.

You can set the visibility based on one hidden form's timer running to see if a flag is set at the end of the calculation procedure.
 
Fully loaded meaning that all of the controls have loaded, recordsources for all controls, yes calculations processed, so that when it becomes visible you see a flicker free updated screen, not a screen where you see all of the controls loading one by one..
 
So as I said, create a hidden form, where you will have the form timer looping through. Create a flag (public). I am not sure where your calculations are, if they are in form load event try.
Code:
Private Sub Form_Load()
    [COLOR=Green]'your code calculations[/COLOR]
    yourPublicFlag = True
End Sub
Your hidden form timer
Code:
Private Sub Form_Timer()
    If yourPublicFlag Then
        Forms!yourCalculatedForm.Form.Visible = True
    End If
End Sub
 
Thanks, that does work, but I think that due to the amount of information and control source info that it then shows slowly, although you now do not see the controls updating.
 
I am not sure if that means 'it works great' or 'this is not what I am looking for'
 
Yes, that's great, thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom