Forms 4.5: where to put code to create new record?

From: Todd Owers <ToddO_at_gcr1.com>
Date: 15 Jun 1998 22:20:56 GMT
Message-ID: <01bd98ab$c18cc660$764c1bcc_at_toddo.gcr1.com>


[Quoted] [Quoted] I have a block of code that I want to execute each time a user adds a new record. The problem is that, because of the variety of ways in which a user can create a new record in Forms 4.5, I can't figure out where to locate the code so that the same body of code gets executed no matter how a new record is created.

My application has three ways for the user to create a new record:

  1. Select 'Add New Record' from the menu. This invokes DO_KEY('CREATE_RECORD').
  2. At the last record, press the Next Record icon on the toolbar. This invokes DO_KEY('NEXT_RECORD'), which creates a new record if the current record is the last record in the block.
  3. At the last record, press the down arrow key. This invokes the DOWN built-in, which also creates a new record if the current record is the last record in the block.

At first, I put the code in a Key-Crerec trigger. This trigger fires after [Quoted] option #1 above, but not after options 2 or 3. Then, I put the code in a When-Create-Record trigger. This trigger fires after options 2 and 3, but not after option 1. What gives? I would expect the When-Create-Record trigger to fire in all situations when a new record is created, but it does not.

Thanks in advance for any suggestions.

Todd Owers
toddo_at_gcr1.com Received on Tue Jun 16 1998 - 00:20:56 CEST

Original text of this message