S
ScardyBob
Hello all,
I have a form with two subforms (subfrm1 and subfrm2). When a user
makes a selection in a combo box on the main form, it loads the
appropriate forms into subfrm1 and subfrm2. I have set it up to where
the combo box AfterUpdate event sets the SourceObject property of the
subforms and the UnLoad event of the main form clears it. I encounter a
problem when for some reason the main form closes improperly (error,
Access crashing, etc.) and doesn't clear the subform's SourceObject
properties. The next time the main form is opened, I get an
"'Error': 2455 You Entered an expression that has an invalid reference
to the property Form/Report"
Because the OnCurrent event of subfrm1 refers to the form in subfrm2 as
such:
Set subfrm2 = subctrl2.Form
I've tried getting around this by having subfrm1 check the SourceObject
property of subfrm2, but it always has the correct form input. It
appears that the subfrm2 has been initialized enough to have the
correct SourceObject entered, but not enough to have fully loaded the
form.
Is there a way to check to see if the subform has been fully loaded?
Thanks,
Mike
I have a form with two subforms (subfrm1 and subfrm2). When a user
makes a selection in a combo box on the main form, it loads the
appropriate forms into subfrm1 and subfrm2. I have set it up to where
the combo box AfterUpdate event sets the SourceObject property of the
subforms and the UnLoad event of the main form clears it. I encounter a
problem when for some reason the main form closes improperly (error,
Access crashing, etc.) and doesn't clear the subform's SourceObject
properties. The next time the main form is opened, I get an
"'Error': 2455 You Entered an expression that has an invalid reference
to the property Form/Report"
Because the OnCurrent event of subfrm1 refers to the form in subfrm2 as
such:
Set subfrm2 = subctrl2.Form
I've tried getting around this by having subfrm1 check the SourceObject
property of subfrm2, but it always has the correct form input. It
appears that the subfrm2 has been initialized enough to have the
correct SourceObject entered, but not enough to have fully loaded the
form.
Is there a way to check to see if the subform has been fully loaded?
Thanks,
Mike