In Access, there used to be a way to Set the first letter in a field to automatically UpperCase in a form or table to override a lowercase entry. Does anyone know what that is? Thanks
Capital Letters in a field
Collapse
X
-
I know of 2 ways to do this.
One is to put code somewhere to fix what the user entered:
Code:Private Sub Text2_Exit(Cancel As Integer) Text2 = StrConv(Text2, vbProperCase) End Sub
The other is to put an input mask on the field like
>A<CCCCCCCCCCCC CCCC
but that makes the first character (which is required) capitalized, and all subsequent letters (optional) small. It doesn't allow any more capital letters, but it does allow you to set a maximum length by the number of C's you put in.
Here's info on input masks:
-
To capitalize only the first character in a textbox:
Code:Private Sub TextboxName_AfterUpdate() Me.TextboxName = UCase(Left(Me.TextboxName, 1)) & Right(Me.TextboxName, Len(Me.TextboxName) - 1) End Sub
Linq ;0)>Comment
Comment