MS Access StrConv() Function

The StrConv() function in MS Access allows you to convert a string to uppercase, lowercase, proper case (first letter of each word capitalized), or perform other character conversions, including those relevant to specific language locales.



StrConv(): Definition and Usage

This function provides flexibility for manipulating the casing and character set of strings. This is particularly helpful when you need to standardize text data or convert between different character encoding schemes.

Syntax

Syntax

StrConv(string1, conversion, LCID)
      

Parameter Values

Parameter Description
string1 The string you want to convert. This is required.
conversion Specifies the type of conversion. This is required. Values:
  • 1: Uppercase
  • 2: Lowercase
  • 3: Proper Case (first letter of each word capitalized)
  • 4: Convert narrow characters to wide characters (double-byte characters)
  • 16: Hiragana to Katakana (Japanese)
  • 32: Katakana to Hiragana (Japanese)
  • 64: Convert to Unicode
  • 128: Convert from Unicode to default code page
LCID (Optional) Locale ID. If omitted, the system's default locale is used. This is relevant for character conversions specific to a language or region.

Examples

Converting to Uppercase

This converts the string "SQL Tutorial is cool" to uppercase.

Syntax

SELECT StrConv("SQL Tutorial is cool", 1) AS ConvertedString;
      
Output

SQL TUTORIAL IS COOL
      

Converting to Lowercase

This converts the string to lowercase.

Syntax

SELECT StrConv("SQL Tutorial is cool", 2) AS ConvertedString;
      
Output

sql tutorial is cool
      

Converting to Proper Case

This converts the string to proper case (first letter of each word capitalized).

Syntax

SELECT StrConv("SQL Tutorial is cool", 3) AS ConvertedString;
      
Output

Sql Tutorial Is Cool