Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Input format
Message
From
27/11/2009 10:50:15
 
 
To
27/11/2009 10:34:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01436658
Message ID:
01436754
Views:
42
>>>>>>Hi All
>>>>>>
>>>>>>If I want to ensure that entry into a field on a form is only A to Z and 0 to 9 and spaces whats the best method.
>>>>>>
>>>>>>TIA
>>>>>>
>>>>>>Happy Thanksgiving to al in the US as well.
>>>>>
>>>>>In Keypress:
>>>>>if !(IsAlpha(chr(nKeyCode)) or isdigit(chr(nKeyCode)) or nKeyCode=32)
>>>>>  nodefault
>>>>>endif
>>>>
>>>>Thanks Tore.
>>>>
>>>>Quiet here today. All the yanks are stuffing themselves with turkey etc
>>>
>>>You're welcome.
>>>Another more felxible solution is
>>>if !upper(chr(nKeyCode))$"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "
>>>   nodefault
>>>endif
>>
>>Good morning. (Well, afternoon in your case). Why is that more flexible?
>
>It's afternoon, 16:30 right now. :-)
>
>By more flexible I mean that you can easily add or subtract from the list of "legal" characters.

Hi Tore think I may change to an exclusion list as I've justs found that it also prevents tabs backspace and return .
Previous
Reply
Map
View

Click here to load this message in the networking platform