Form with two subforms, Open/Load gets stuck randomly
Some time ago I mentioned this trouble with one form. The form has two subform controls on it. On the main form itself, processing gets stuck between finishing the Form_Open event, Form_Load never gets processed until I click somewhere on the main form.
I put some Debug.Print LOC's in the various events, Immediate window output as follows:
This morning I tried rebuilding the quality form from scratch, and the fresh form had the same random pause, so I rolled back to last evening's version of the FE DB.
When I clean up the DB ( http://www.access-programmers.co.uk...to_Decompile_/_Compact_/_Compile_an_Access_DB ), then for sure the first time quality opens, it does not get stuck / pause. Subsequent times I open it, then randomly (50% of the time perhaps) it gets stuck.
The area of code processing gets stuck at is as follows:
Does anyone have suggestions how to resolve this random pause-until-click?
I have resorted to a bit of very annoying duct tape to alert people to trouble. :banghead: Such should NOT be necessary! Suggestions?
Some time ago I mentioned this trouble with one form. The form has two subform controls on it. On the main form itself, processing gets stuck between finishing the Form_Open event, Form_Load never gets processed until I click somewhere on the main form.
I put some Debug.Print LOC's in the various events, Immediate window output as follows:
Code:
Form_subform_quality Form_Open
Form_subform_quality Form_Load
Form_subform_metooling_gaging Form_Open
Form_subform_metooling_gaging Form_Load
Form_quality Form_Open
Form_quality Form_Open, Exit_Form_Open
[B][COLOR=Red](pause until click)[/COLOR][/B]
Form_quality Form_Load
When I clean up the DB ( http://www.access-programmers.co.uk...to_Decompile_/_Compact_/_Compile_an_Access_DB ), then for sure the first time quality opens, it does not get stuck / pause. Subsequent times I open it, then randomly (50% of the time perhaps) it gets stuck.
The area of code processing gets stuck at is as follows:
Code:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
Debug.Print "Form_quality Form_Open"
'Test if this form is being opened programatically vs manually
If architecturecheck_CheckHowStarted() = False Then
'Caught someone being sneeky... we outtahere!
Cancel = True
End If
[B][COLOR=Blue]Me.fldprojecttitle.BackColor = vbRed
Me.fldprojecttitle.Value = "Loading of form got stuck, please click here!"[/COLOR][/B]
Exit_Form_Open:
Debug.Print "Form_quality Form_Open, Exit_Form_Open"
Exit Sub
Err_Form_Open:
Call errorhandler_MsgBox("Form: " & TypeName(Me) & ", Subroutine: Form_Open()")
Resume Exit_Form_Open
End Sub
Private Sub Form_Load()
On Error GoTo Err_Form_Load
Debug.Print "Form_quality Form_Load"
'Call shared code to make sure the form is set properly
Call uiutils_ResetForm(Me)
I have resorted to a bit of very annoying duct tape to alert people to trouble. :banghead: Such should NOT be necessary! Suggestions?
Last edited: