Discussion Locked

Capitalization of a Text field Access 2k

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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.

2 replies

by oz_media

Change the format of the text field to begin with a capital letter only. It won't change existing entries but will update the new ones as entered.

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.