Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoid special chars in data entry
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01042890
Message ID:
01042972
Vues:
19
Yes, exactly :o)
As I said not tested. But Mark can revese the condition, to put not allowed chars:
LPARAMETERS nKeyCode, lShift
LOCAL notallowed_chars
allowed_chars = "/-+=_*[]{}()`~!@#$%^&" && etc..
IF UPPER(CHR(nKeyCode)) $ notallowed_chars
   NODEFAULT
   RETURN
ENDIF
again not tested :o)

>>>Hi. I have first name/last name fields. and I only want to allow letters,digits and space there. no special chars. i.e. comma,semicol etc.
>>>if i use 'N' in inputmask it allows letters and digits but no space.
>>>can you help me with this? thanks in advance. appreciate.
>>
>>Mark,
>>In KeyPress Event of that TextBox you can put:
>>
>>LPARAMETERS nKeyCode, lShift
>>LOCAL allowed_chars
>>allowed_chars = "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
>>IF NOT UPPER(CHR(nKeyCode)) $ allowed_chars
>>   NODEFAULT
>>   RETURN
>>ENDIF
>>
>>(not tested)
>
>Hi BB
>
>Doesn't this mean, though, that if he types Backspace or delete button it won't be allowed?
>
>Terry
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform