Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Find what form opened another form

0 views
Skip to first unread message

Luis

unread,
Nov 12, 2007, 6:26:01 AM11/12/07
to
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

Douglas J. Steele

unread,
Nov 12, 2007, 7:31:57 AM11/12/07
to
Access doesn't keep track of it. You'll have to pass that information to the
form (as its OpenArgs parameter).

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Luis" <Lu...@discussions.microsoft.com> wrote in message
news:23D3374A-C52E-409E...@microsoft.com...

UpRider

unread,
Nov 13, 2007, 12:25:41 AM11/13/07
to
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

"Luis" <Lu...@discussions.microsoft.com> wrote in message
news:23D3374A-C52E-409E...@microsoft.com...

0 new messages