Subject Re: LOGICAL ERROR
From Mervyn Bick <invalid@invalid.invalid>
Date Mon, 12 Mar 2018 09:06:11 +0200
Newsgroups dbase.getting-started

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.