On Tue, 24 May 2005 11:56:08 -0700, "Jenn Maura" <Jenn
How do I format text in proper noun format in Access when there are two words
in the field? For example: the city field>colorado springs.
Think about some other possible capitalization issues: McAllen, TX;
Truth or Consequences, NM (which could be shown as Truth Or
Consequences, I'll admit). The best bet is to capitalize the names
correctly at the time that they are entered.
One possibility (which will risk miscapitalization in both these
examples) is to use the following code in the AfterUpdate event of the
Form control in which you're entering the city (the form is essential,
table datasheets don't have any usable events):
Private Function txtCityName_AfterUpdate()
' Only change capitalization if the user entered all lower case
If StrComp(Me!txtCityName, LCase(Me!txtCityName), 0) = 0 Then
Me!txtCityName = StrConv(Me!txtCityName, vbProperCase)
End If
End Sub
John W. Vinson[MVP]