Article ID: 209520 - View products that this article applies to.
This article was previously published under Q209520
Novice: Requires knowledge of the user interface on single-user computers.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
Microsoft Access does not have a simple setting to force entries in a field or control to be saved and displayed in uppercase letters; however, you can use other means to ensure that only uppercase letters are used.
Use a Validation RuleThe 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) = 0In Microsoft Access 2000, you have two additional alternatives: an input mask, or an event procedure triggered by the KeyPress event.
Use an Input MaskThe following input mask accepts either letters or numbers and makes the first letter uppercase and the following three lowercase:
Use the On Key Press Event ProcedureCAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.
To change letters to uppercase as you type them in a control, follow these steps:
For more information about input masks, click Microsoft Access Help on the Help menu, type inputmask property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
For more information about validation rules, click Microsoft Access Help on the Help menu, type validationrule, validationtext properties in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
For more information about the On Key Press event, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type keypress event in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Article ID: 209520 - Last Review: July 15, 2004 - Revision: 1.2
Contact us for more help