Re: Falling Off a Block after last Record

From: Marcel Claus <Marcel.Claus_at_Informatik.Uni-Oldenburg.DE>
Date: Thu, 30 Jul 1998 15:42:23 +0100
Message-ID: <6ppt7g$gau_at_news.Informatik.Uni-Oldenburg.DE>


Ric Parodi wrote:

> I am using Form Designer 4.5. I have a block sitting in a form which
> displays multiple records. There are multiple blocks. The navigation is
> set within the block, from record to record. What I would like to happen is
> that when the user tabs forward out of the 'last' record, I can issue a
> GO_ITEM command. I get the FRM-40102 message (at last record), but I have
> not been able to intercepted in a ON-MESSAGE or ON-ERROR (yes, I am trying
> all I can think of) trigger.
>
> Any help?
>
> Thanks,
>
> -Ricardo A. Parodi
> California Institute of Technology

Use a KEY-NEXT-ITEM Trigger.
The code I use is:

IF :THE_BLOCK.THE_FIELD is not NULL THEN -- check, if data is in the row   NEXT_RECORD;
  GO_ITEM('THE_BLOCK.THE_FIELD');
ELSE -- row is empty, go to next block   DELETE_RECORD;
  GO_ITEM('NEXT_BLOCK.A_FIELD');
END IF;

  • optional for pseudo-auto-commit: :SYSTEM.MESSAGE_LEVEL := 6; do_key('COMMIT_FORM'); :SYSTEM.MESSAGE_LEVEL := 0;
Assuming there is only one field THE_FIELD in the block. Write the KEY-PREV-ITEM trigger in the same way and dont forget to check if you are in the first record!

Marcel Received on Thu Jul 30 1998 - 16:42:23 CEST

Original text of this message