The last time I used chrsaw() was maybe 20 years ago. I don't think it's kind of outdated, and I don't think it's the right function for this task.
>Hi, Naoto:
>
>>Which KeyPress() event? The Form or TextBox? If the one in the Form object, did you set KeyPreview to .T. ?
>
>1) Textbox.KeyPress()
>
>2) Yes. KeyPreview is set to .T.
>
>Anyway you must understand before posting this I put code after IF !A... and. after IF !B and the code worked. So CHRSAW() returns .F. despite there are keystrokes remaining in the buffer.
>
> Héctor