ACC: Validation Rule to Require Uppercase Letters in a FieldID: Q100469
|
Novice: Requires knowledge of the user interface on single-user computers.
Microsoft Access does not have a setting to force entries in a field
or control to be in uppercase letters; however, you can use a validation
rule to ensure that only uppercase letters are used.
The following sample validation rule requires that entries in a field
or control called Last Name be entered in uppercase letters:
StrComp(UCase([Last Name]),[Last Name],0) = 0
>C<CCC
Sub Field0_KeyPress (KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
For more information about input masks, search the Help Index for
"InputMask property," or ask the Microsoft Access 97 Office Assistant.
For more information about validation rules, search the Help Index for
"ValidationRule property," or ask the Microsoft Access 97 Office Assistant.
For more information about OnKeyPress, search the Help Index for
"OnKeyPress property," or ask the Microsoft Access 97 Office Assistant.
Additional query words: capital letter upper case all
Keywords : GnlValid
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: March 24, 1999