>>>Another more felxible solution is
>>>if !upper(chr(nKeyCode))$"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "
>>> nodefault
>>>endif
>>
>>Good morning. (Well, afternoon in your case). Why is that more flexible?
>
>I would guess that if I wanted to include other specific characters (say * or %) I could include them in the string very easily.
Still doesn't translate too well for other codepages. Even chr(255) can be a valid character somewhere. VFP's isalpha() function works fine for those, so you'd be better off building this string once early (in the init of an object), to include any characters for which isdigit() or isalpha() return .t., plus your personal assortment of punctuation. Then everything else is rejectable.