>your code in keypress event in principe fires an error :
>nkeycode is an integer and messagebox must receive a string :
>
>messagebox(nkeycode)
>must be turned on messagebox(trans(nkeycode))
>
>
Just a side note: this is a VFP beauty, you can pass any kind of data as the first parameter of MESSAGEBOX(), even objects. The TRANSFORM() is implicit (of course, what we can't do is to mix data types in the expression, for instance "Keycode: " + nKeycode).
----------------------------------
António Tavares Lopes