Calling mini-form from two different Forms

Z

ZeManel

Hi,

I have created two forms and in each form I have added a button that allows
me to call a mini-form so I can add members or data.
I would like to be able to, say, if I call the mini-form from Form1 and
close it, it has to open the Form1; but if I call the mini-form from Form2
and close it, it has to open the Form2.

Can anyone help me on this, some how I just don't remember how place the
conditions.

Thanks in advance,
ZeManel
 
G

Gina Whipp

ZeManel,

Put this On_Close of the Mini-Form (Provided the Mini-Form can only be
opened from one of the two forms listed. If it can be opened any other way
then post back because this code will open Form 2 when it's opened from
another source.

If CurrentProject.AllForms("Form 1").IsLoaded Then
DoCmd.OpenForm "Form 1"
Else
DoCmd.OpenForm "Form 2"
End If


--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
Z

ZeManel

Hello Gina,

Working now, thanks a lot.



Gina Whipp said:
ZeManel,

Put this On_Close of the Mini-Form (Provided the Mini-Form can only be
opened from one of the two forms listed. If it can be opened any other
way then post back because this code will open Form 2 when it's opened
from another source.

If CurrentProject.AllForms("Form 1").IsLoaded Then
DoCmd.OpenForm "Form 1"
Else
DoCmd.OpenForm "Form 2"
End If


--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top