In Access, the StrConv function convert a string to upper case, lower case, proper case, or several other formats.
The syntax for the StrConv function is:
StrConv ( string, conversion, LCID )
string | String expression to be converted. |
conversation | The type of conversion to perform. |
LCID | LCID is optional. The LocaleID, if different than the system LocaleID. If this parameter is omitted, the StrConv function assumes the system LocaleID. |
The following is a list of valid parameters for conversion.
Constant | Value | Description |
vbUpperCase | 1 | Converts the string to uppercase characters. |
vbLowerCase | 2 | Converts the string to lowercase characters. |
vbProperCase | 3 | Converts the first letter of every word in string to uppercase. |
vbUnicode | 64 | Converts the string to Unicode. |
vbFromUnicode | 128 | Converts the string from Unicode to the default code page of the system. |
Example
|
VBA Code
|
This example uses the StrConv function to convert a string to upperCase. Now the MyString variable would contain the value “WEBCHEATSHEET”.
SQL query
You can also use the StrConv function in a query.
|