Link to home
Start Free TrialLog in
Avatar of maryeb
maryeb

asked on

return to form that is already open

If a form is already open I want to return to this form not open the same form again. Below is how I tried to do this but it does not work.

IF ID_NULL(FIND_FORM('FORM1')) THEN
   OPEN_FORM('FORM1');
ELSE
   GO_FORM('FORM1');
END IF;
ASKER CERTIFIED SOLUTION
Avatar of jtrifts
jtrifts
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maryeb
maryeb

ASKER

Yes, I had GO_FORM(form name of the .fmx file);
It works fine with GO_FORM(module name);

BUT,

I have a search form, where the user enters a pid and data is displayed on this form relating to that pid. Then the user clicks the button More, if they want to see further information about this pid. This brings the user to another form that displays further information.

Now if the user returns back to the search screen and enters a different pid I want the user to be able to see further information on this pid if they wish, but I can't do this as with the code below I am asking it to go to the form if it is already open. If I remove this code (GO_FORM('FORM2');) and the user enters the same pid into the search form for the second time a new form will be opened displaying information relating to this pid. Therefore two forms will be opened with the exact same data, I want it to go to the form if the pid is the same.

IF ID_NULL(FIND_FORM('FORM2')) THEN
 OPEN_FORM('FORM2');
ELSE
 GO_FORM('FORM2');
END IF;

Is there another way around this problem.

OK.  Let me see if I have this straight.

Form1 = search form.
Form2 = results form.

Run Form 1. Enter query detail (PID). Press Search Button.
IF FORM2 already open with same PID, go to the FORM2.
IF FORM2 NOT OPEN or FORM 2 is open but PID is different, open a new instance of FORM2.

Is this what your requirements are?

IF so, I'll post a follow-up...
Avatar of maryeb

ASKER

Yes
Avatar of maryeb

ASKER

JT,

The above comment is what I am looking for........any update.
Sorry Mary...have been busy...I'm not certain...

And you haven't yet told me why you're so keen on keeping this as a two form approach...especially when most think that this might be an inappropriate design...

I'll try to ge tback to you when I can, but am swamped with other things at the mo...

Regards,

JT
Avatar of maryeb

ASKER

I now have

Form1 where I enter my search criteria(PID), then my search data relating to this criteria is displayed on the same form(Form1).

In Form1 I may have a number of records displayed. So now to see even more information relating to the PID entered I have a button called MORE which opens a new form(Form2) with additional information.

This is why I still need a solution to the above.
This could still be done within the same form either on another canvas, or within another window...
Please update and finalize this old, open question. Please:

1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.

EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.

Thanks,

** Mindphaser - Community Support Moderator **

P.S.  Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.
either points to jtrifts or delete the question.
JT
Thanks, JT, points clearly to you. :)
Moondancer - EE Moderator