First Letter Uppercase Only Access Form
This article explains how you can format the user input in an Access form so that the first character will appear as uppercase and the rest of the input will appear as lowercase, regardless of the way the user has input the data. The method explained in this article uses VBA.
The user can input a first and last name in the form. We want to the first letter of the input to appear as upppercase and the rest of the input to appear as lowercase regardless of how the user decides to input values in the textboxes.
Open the form in design view. Click on the View Code button:
Add the following code to the LostFocus event handler:
Note: It is assumed that the name of the textbox is
. The name of the textbox can be modified in design view from the Property Sheet:
Add the following code for the
No matter how the user inputs values in the First_Name and Last_Name textboxes, the first character will be converted to uppercase and the rest will be converted to lowercase.
You can download the sample file used in this article from the link below:
- Access, Add Leading Zeros Custom Number Formats
- Access, Convert User Input to Uppercase
- Access, Convert User Input to Lowercase
- Access Field Properties Locked
- Access Check If Field is Null, Conditional Macro
- First Letter Uppercase Only Access Tables
- Access, Fixed Decimal Places Number Format