Re: Forms4.5 Trigger when entering a character in a new record

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1996/12/09
Message-ID: <58hu8k$237_at_shadow.CSUFresno.EDU>#1/1


In article <VHAUSWUR.61.32AC0FBE_at_Materna.DE>, Volker Hauswurz <VHAUSWUR_at_Materna.DE> wrote:
>
 

> We have some master-details and we have to lock the master when we
> update the master, but also when inserting a detail for a master.
>
> I would like to know if there is a trigger which fires when you
> enter a new character in a field of a new record. Create-record and
> When-New-Record-Instance already fire when you navigate to a new
> record in the detail block. If you update a queried record the
> ON_LOCK trigger fires. So we search for a way to handle the situation
> when you enter the first character in a new record.
>
>Does anyone know a solution?

There isn't a trigger that I know of, but you can fool the form into running the on-lock trigger. In the Create-record or When-new-record-instance trigger, when the record is first entered, its status will be NEW. Set the record status to QUERY_STATUS. Then, when the user enters the first keystroke, the on-lock trigger will fire. At this point you could lock the master record, and don't forget to set the detail record status back to its correct value of INSERT at some point.

But be careful. I'm sure the Forms designers never intended for you do do anything like this. I'm using Forms4.5.5.6 (Dev2K 1.2), and I seem to recall with a prior version of Forms 4.5, that changing record status like this caused a GPF.

I am using this trick in a form, but it isn't as complicated a situation as yours. My block is just a single-record control block where data is entered, and if the user enters anything, then I want to look up some default values from several tables.

Hope this helps,
Steve Cosner Received on Mon Dec 09 1996 - 00:00:00 CET

Original text of this message