Find what form opened another form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.
I'm trying to use a form on two different forms and return data into the
form that opened it.

How do i find what form opened another form?

Thanks.

Luis
 
Access doesn't keep track of it. You'll have to pass that information to the
form (as its OpenArgs parameter).
 
Luis, use something like this in the *called* form. You would think that
the active form is the one executing the code, but it's not - it's the
previous or calling form. Just what you want. Make sure you use the
Form_Open event.

Private Sub Form_Open(Cancel As Integer)
Dim frmCalling as Form
Set frmCalling = Screen.ActiveForm
MsgBox "I have been called by " & frmCalling.Name
End Sub

UpRider
 
Back
Top