Hi Chris,
In Table Design, set a validation rule on the field, like this:
Is Null Or Not Like "*[!A-Za-z]*"
Is Null allows the field to be left empty; remove it if the field must
be filled.
Like "*[!A-Za-z]*" requires at least one character that is not a letter,
and the Not reverses that, thus forbidding any character that is not a
letter.
Users will be able to type anything but the validation rule will be
applied when they move away from the field (including trying to update
the record). If you want also to make it impossible to type incorrect
characters, put something like this in the KeyPress event handler of the
textbox that is displaying the field:
Select Case KeyAscii
Case 8, 9, 13 'Backspace, tab, enter: process these
'Do nothing
Case 65 to 90, 97 to 122 'A-Z, a-z
'Do nothing
Case Else
'supress the keystroke
KeyAscii = 0
End Select
Please help
how can i only allow user to type leters (like
christopher) only!! not characters (like chris%&her)
many thanks chris