Hello and thank you for any attention my post may receive.
Windows XP
MS Access 2007
So when i call up two forms, the first called form disappears. I want both forms to appear on the screen at the same time.
My module 'modDaisyChain' returns an 'Outside procedure' error for 'Me.' I understand Me is not allowed in a module, but I really do not know what i should be using in this instance.
Any help is greatly appreciated!
Public gstrCallingForm As String
Const DAISY_CHAIN_ON As Boolean = False '(True for on, False for off)
Dim mstrCallingForm As String
gstrCallingForm = Me.Name
Me.Visible = False
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
If DAISY_CHAIN_ON Then
'set calling form
mstrCallingForm = gstrCallingForm
gstrCallingForm = ""
End If
Exit_Form_Open:
Exit Sub
Err_Form_Open:
Resume Exit_Form_Open
End Sub
Private Sub Form_Close()
On Error GoTo Err_Form_Close
If DAISY_CHAIN_ON Then
'return to calling form
If mstrCallingForm <> "" Then
Forms(mstrCallingForm).Visible = True
End If
End If
Exit_Form_Close:
Exit Sub
Err_Form_Close:
If Err = 2450 Then
'ignore error if calling form is no longer loaded
Resume Next
Else
Resume Exit_Form_Close
Resume
End If
End Sub