Capitalization of a Text field Access 2k
Is the a function in Access 2000 that does the same as the "proper" function in Excel.
The function "proper" converts to capital the first letter of a text and to small the rest.
Software
Is the a function in Access 2000 that does the same as the "proper" function in Excel.
The function "proper" converts to capital the first letter of a text and to small the rest.
by oz_media
by dbgirl
Depending on what you are trying to do, either one of the following will work. The first one changes just the first character of a text field to upper case. The second one changes the first character in each word to upper case, and all of the other characters to lower case. Either one you choose should be used in the "After Update" event procedure for the text field. "txtTextField" should be replaced with the name of the text field you are altering. If your text field name contains a space, then you will need to enter it as [txt Text Field], including the brackets.
(1)
' used to change the first letter of
' a text field to upper case, without changing the rest of the string
Me!txtTextField = UCase(Left(Me!txtTextField, 1)) & Mid(Me!txtTextField, 2)
(2)
' used to change a text field to ProperCase
Me!txtTextField = StrConv(Me!txtTextField, vbProperCase)
If you have any additional questions, please let me know.
This discussion is closed to new replies.
Sort by Trending