The call stack isn't available through VBA, but you can pass the calling
form's name via the OpenForm method's OpenArgs argument:
DoCmd.OpenForm "frmMyForm", , , , , , "frmCallingForm"
Retrieve the calling form's name using the Me.OpenArgs construct
Private Sub Form_Open(Cancel As Integer)
Dim sCallingForm As String
sCallingForm = Me.OpenArgs
MsgBox sCallingForm
End Sub
Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia