Re: How to determine source of opened form



To determine whether a given form is open ...

If CurrentProject.AllForms("NameOfFormHere").IsLoaded Then
'it's open
Else
'it's not
End If

Access does not (so far as I am aware) expose any means to identify what
form or procedure opened the active form, so you'd need to keep track of
that yourself in some way, for example by passing the name of the calling
form in the OpenArgs argument of the OpenForm method or by using a global
variable.

--
Brendan Reynolds (MVP)


"Mary Fran" <MaryFran@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:92211948-3E23-4EA8-8232-929E62C7CDA2@xxxxxxxxxxxxxxxx
> Hi! I have a procedure that I wish to run depending on which form was used
> to
> open the existing form. How do I determine that or if a given form is
> open?
> Thanks.


.



Relevant Pages