Re: Forms 4.5 - GO_FORM and OPEN_FORM

From: Simon Hedges <shedges_at_hhhh.freeserve.co.uk>
Date: Thu, 13 May 1999 18:52:04 +0100
Message-ID: <7hf3bj$pv4$1_at_news6.svr.pol.co.uk>


I tried this some years ago - it just won't work. It's not your coding, it's just that Oracle Forms won't do this.

You have to programmatically change the 'where' clause of the block to make your global_id part of it, and then execute the query. You can use the SET_BLOCK_PROPERTY built-in to do this.

You will then have to change the 'where' clause back to whatever it was before
so that querying works normally.

Simon Hedges
Gloucester
UK

>jg wrote in message ...
>I have 2 forms and added a button to navigate from one form to the other to
>go to the 2nd form. If the 2nd form is already open, I navigate to it
using
>GO_FORM and when it's not already open, I open it using OPEN_FORM. When
>going to the second form I am also passing a global variable and executing
a
>query to display the record matching the global variable. The problem I
>have is that when the 2nd form is already open I get a message saying "This
>function cannot be performed here". This seems to happen because of the
>EXECUTE_QUERY built-in I used in the WHEN-WINDOW-ACTIVATED trigger on the
>2nd form but not sure. Here is an example of my code and the various
>triggers. If you know of another way to do this I would also welcome your
>suggestions:
>
>1st Form:
>
>WHEN-BUTTON-PRESSED TRIGGER:
>
> :global.id := :emp_id;
>
> IF ID_NULL(FIND_FORM('modulename')) THEN
> OPEN_FORM('filename');
> ELSE
> GO_FORM('modulename');
> END IF:
>
>2nd Form:
>
>PRE-QUERY TRIGGER (block level)
>
> :item := :global.id;
>
>WHEN-WINDOW-ACTIVATED
>
> EXECUTE-QUERY;
Received on Thu May 13 1999 - 19:52:04 CEST

Original text of this message