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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding out who called the form.

Status
Not open for further replies.

JasonUMD

Programmer
Dec 12, 2001
9
JP
I have a button on one form that, when clicked, closes the current form and opens a second form.

When that second form is closed, I want to reopen the first form. (When I was leaving the first form open I was getting strange results, since the 2nd form will be editing information on the first form, hence closing the first form)

Since I have the same button on more than one form, I need to find out which form called the second form.

I am already passing a value in OpenArgs. Although I can add a starting or trailing code and strip it out, I was wondering if there is another, more elegant method.
 
There is a way to pass multiple values in the open arg parameter. It's too long to go into here but you can find it in "Access 97 developers Handbook" by Paul Litwin and Ken Gertz.

Your other option would be to not close the first form and only make its visible property false. Somewhere on the first form you could have a textbox that is non-visible with that forms name hardcoded in it. Have your second form reference that textbox to recover the name when you chose to return to it.

I've never tried this. Let me know if it works.

DD
 
Thanks dumdum, I looked it up in the ADH. I actually broke down and just used a global to hold the calling form name.

My shame is great, but the code runs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top