Subject Re: LOGICAL ERROR
From Mustansir Ghor <mustan31@hotmail.com>
Date Mon, 12 Mar 2018 03:35:09 -0400
Newsgroups dbase.getting-started

Dear Mervyn

Thank you.

Mustansir

Mervyn Bick Wrote:

> On 2018-03-11 10:09 PM, Mustansir Ghor wrote:
> > Dear Mervyn
> >
> >   'This' is form.eamont in this case.  The event handler is executed by
> >> form.eamont when the value changed.  As you use PBRCANCEL to save 0 to
> >> form.eamont the event handler will immediately disable PBRCANCEL and
> >> PBRSAVE. These pushbuttons are disabled until, say, the edit pushbutton
> >> is pressed which would execute code to enable them again.
> >
> > On testing,  the error is PBRCANCEL and PBRSAVE does not get disabled. I dont know why.
>
> EAMONT_onChange is executed if the user enters 0 and then uses TAB to
> move to the next control.
>
> If you use the pushbutton's onClick event handler to place 0 in EAMONT
> and move focus to the next control the onChange event isn't triggered.
> You will need to execute EAMONT_onChange yourself.         
>
>    function PBRCANCEL_onClick()
>       form.eamount.value=0
>       form.cbregname.setfocus()
>       form.eamont_onChange()
>   return
>
> Mervyn.
>