Re: Forms 4.5 Query ???

From: Volker Hauswurz <VHAUSWUR_at_Materna.DE>
Date: 1996/02/27
Message-ID: <VHAUSWUR.48.3132F006_at_Materna.DE>#1/1


In article <312F2C15.7308_at_ix.netcom.com> Sean Kubovcik <rbtkubo1_at_ix.netcom.com> writes:
>From: Sean Kubovcik <rbtkubo1_at_ix.netcom.com>
>Subject: Forms 4.5 Query ???
>Date: Sat, 24 Feb 1996 10:17:41 -0500
 

>I have a form that has master/detail relationship with the master on one canvas and the
>detail on another. I want to be able to query on the detail and go_block(master)via double
>clicking on the specific detail record's key and have the master canvas populated and
>queried on the selected detail record. I tried to have a double click event (on the detail
>record key) with:
 

> go_block('master');
> enter_query;
> :master_field := :detail_field; (record to query on)
> :execute_query;
 

>This would not work. I even tried to put the assignment in a pre_query trigger of the
>master block, but, that fails.

There are two problems:
-'enter_query' waits for user input. This is not what you want. -the assignment ':master_field := :detail_field; ' makes Forms think that you inserted a record and Forms asks if you want to commit...

I think a solution is

 go_block('master');
 set_record_property (current_record, current_block, STATUS, QUERY_STATUS); --

-- for current_record, current_block see the manuals you need record_number 
-- and block_name
-- now Forms knows that you do not want an insert
 :master_field := :detail_field; (record to query on)  :execute_query;

Bye
 Volker Received on Tue Feb 27 1996 - 00:00:00 CET

Original text of this message