Re: Forms trigger problem.

From: Ken Denny <ken_at_kendenny.com>
Date: Wed, 12 Jun 2002 18:53:37 GMT
Message-ID: <Xns922B984A8F93Akendenny_at_65.82.44.7>


"Art Shen" <artbecky_at_rogers.com> wrote in news:m2MN8.261101$ah_.41674_at_news01.bloor.is.net.cable.rogers.com:

> mistake, here is the right one:
>
> Hi there,
> I got a problem here in Forms4.5
>
> I have three itmes: item1, item2, item3.
> item1 is keyed in by user, and item2 is populated based on the value
> of
> item1. Now, focus is on item3 and being tabed over, an
> WHEN-VALIDATE-ITEM trigger is fired. I want to put some new validation
> in it based on the value of item2. If the validation fail, we want the
> focus moved to item1 to give user a second chance. However, this
> trigger will never let you leave item3. I there another way I can put
> the validation in? KEY-NEXT-ITEM doesn't work because it is fired
> before WHEN-VALIDATE-ITEM, and I need some result from that trigger to
> do the new validation.
>
> Any idea?
>
> Thanks

Use a timer. If the code in the WHEN-VALIDATE-ITEM triggers decides that focus needs to go to item1, set a timer for 1 millisecond. Then in the WHEN-TIMER-EXPIRED trigger move the focus to item1.

-- 
Ken Denny
http://www.kendenny.com/

The problem with the gene pool is that there is no lifeguard.
Received on Wed Jun 12 2002 - 20:53:37 CEST

Original text of this message