Capitalize the first letter of each word in a phrase

You can use the StrConv function to capitalize the first letter of each word in a text string. The function takes a string and a constant that specifies how to convert the string. For example, the following function:

StrConv("washington, oregon, and california", vbProperCase)

displays the following text:

Washington, Oregon, And California

In a query based on a table that contains LastName and FirstName fields, you can use the following expression to capitalize each first and last name in the table:

Field: =StrConv(([LastName]&", "&[FirstName]),3)

Note   In an expression that contains the StrConv function, you must use the numeric constant 3 in place of the Microsoft Visual Basic constant vbProperCase. You cannot use Visual Basic constants in expressions.