>>>Keypress is the event representation of GRID or COMBO controls :-) BUGgy but can't leave w/o them. Somethimes it asks me to add DODFEAULT() w/o NODEFAULT and just when I thought I figured out what happens that event changes its mind and start behaves differently :-)
>>
>>:-))
>
>BTW, in fact it enters in the IF
>I just tried this, Add 3 other textboxes in the form and change Keypress event of the Text1 to be:
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>thisform.Text2.Value = nKeyCode
>thisform.Text3.Value = IsAlpha(Chr(nKeyCode))
>thisform.Text4.Value = []
>if IsAlpha(Chr(nKeyCode)) AND nKeyCode=>0
> thisform.Text4.Value = [Here -]+Chr(nKeyCode)
> DoDefault(Asc(Upper(Chr(nKeyCode))))
> NODEFAULT
>ENDIF
>
>When I press [d] textbox4 value is [Here - d] but TextBox1 Value is w/o [D] in it.
>So maybe some binary operations are involved between two parameters before they are sent back to KeyPress Event.
BTW, why you're all doing this in the opposite direction? Check Dragan's message I pointed earlier.
If it's not broken, fix it until it is.
My Blog