Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to find out parrent?

Status
Not open for further replies.

WebStar

Programmer
May 1, 2002
69
0
0
DE
Hi,
I have 3 forms calling the 4th one. How can I tell from that 4th form wich one of the first 3 called it. I mean something like me.parent.name (wich doesn't exists ofcourse). Thank you!
 
I'm not aware of a direct way of doing it. In the absence of such, I would declare a public variable "CurrentForm", and a local variable "ParentForm" in each of your forms, then put in the userform.activate for each form:

ParentForm=CurrentForm
CurrentForm=me.name

and put in the userform.terminate for each form:

CurrentForm=ParentForm

I haven't actually tried this, but I don't see why it wouldn't work, and it's not too much trouble...


Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top