Your code will not work for not-english characters.
>Check Help for the format, it doesn't apply to the editbox. I think, it's by design, though I would prefer to have it work for editbox too.
>
>BTW, here is our version of this code
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>IF between(m.nKeyCode, 97, 122)
> NODEFAULT
> nKeyCode= m.nKeyCode - 32
> *-- CHANGE - NN - December 15, 2005 - 11:34:19 - added parameters to the call
> DODEFAULT(m.nKeyCode, m.nShiftAltCtrl)
>ENDIF
>
>
>>Well, I was afraid of that. Glad you sent over that code. I was thinking about testing the range of nKeyCode and wasn't thinking about ISALPHA (a command I don't find much use for), but it's a more sublime solution.
>>
>>I wonder why the format code does not work? Is this considered a bug or by design or do you know?
>>
>>Thanks to each of you.
>>
>>>You must do it in KeyPress
>>>If ISALPHA(CHR(nKeyCode))
>>> NODEFAULT
>>> nKeyCode=ASC(UPPER(CHR(nKeyCode)))
>>> DODEFAULT()
>>>EndIf