Home page
 
 Home 
 ASP 
 PHP 
 SQL 
 HTML 
 JavaScript 
 Search 
 Contact 
 
Search
or browse popular tags
Access Functions
Subscription

Sign up for the free email newsletter for new tips, tutorials and more. Enter your email address below, and then click the button.

Privacy Policy

RSS Twitter

Access: StrConv Function

Print

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

StrConv( "Access function",1 )        returns "ACCESS FUNCTIONS"
StrConv( "Access Functions",2 )       returns "access functions"
StrConv( "access functions",3 )       returns "Access Functions"

VBA Code

Dim MyString
MyString = StrConv("WebCheatSheet",vbUpperCase)

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.

SELECT StrConv([ItemDesired],1) AS Expr1
FROM Orders


If you'd like to see how it works, enter SQL statement and press Execute
 




Tags:

Add To: Add to dzone dzone | Digg this digg | Add to del.icio.us del.icio.us | Stumble it stumbleupon

  • Comments





Copyright © 2005-2014             www.WebCheatSheet.com All Rights Reserved.