Dealing with the complexities of the subform environment...
I need to somehow send the cancel event to the parent form, but I believe I must still set the default / cancel events within the subform context.
I am trying to send (forward) the event to the parent form and am getting an error attempting to do so. Code on the subform is as follows:
And the error I get on the red LOC is as follows:
Yes, the parent form has the Close_Click event.
I need to somehow send the cancel event to the parent form, but I believe I must still set the default / cancel events within the subform context.
I am trying to send (forward) the event to the parent form and am getting an error attempting to do so. Code on the subform is as follows:
Code:
Private Sub btnClose_Click()
On Error GoTo Err_btnClose_Click
'Hack to flush keystrokes out of the buffer so that close via Esc does not generate an error msg
DoEvents
'Close window "parent"
[COLOR=Red]Call Me.Parent.Form.Close_Click[/COLOR]
Exit_btnClose_Click:
Exit Sub
Err_btnClose_Click:
Call errorhandler_MsgBox("Form: Form_subform_metooling_gaging, Subroutine: btnClose_Click()")
Resume Exit_btnClose_Click
End Sub
Code:
Date: 20120118 Time: 14:49:05 UserID: c_mlueck
AppErrorMsg: Form: Form_subform_metooling_gaging, Subroutine: btnClose_Click()
Error Source: Fandango_FE
Error Number: 2465
Error Description: Application-defined or object-defined error
MessageText: The server has reached the maximum number of connections it supports.