Home page
 
 Home 
 ASP 
 PHP 
 SQL 
 HTML 
 JavaScript 
 Search 
 Contact 
 


Search
or browse popular tags
Got questions?

We got answers.

Ask your question about PHP, ASP, Javascript, HTML, CSS, hosting and get professional help, free of charge.

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

Home / SQL / Access Functions

 

 

Access: Chr Function

Print Bookmark and Share

In Access the Chr function returns the character associated with the specified ANSI code.

The syntax for the Chr function is:

Chr ( charcode )

The required charcode argument is the NUMBER used to retrieve the character. The argument charcode is an integer between 0 and 255, inclusive. Applications for Microsoft Windows use the ANSI character set. ANSI character codes in the range 0 to 31, inclusive, are the same as the standard, nonprintable ASCII codes. For example, Chr(13) returns a carriage-return character, and Chr(10) returns a linefeed character. Together they can be used to force a new line when message strings are formatted with MsgBox or InputBox.

Example

Chr( 65 )    returns "A"
Chr( 97 )    returns "a"

VBA Code

Dim MyChar
MyChar = Chr(100)

This example returns "d", the character associated with the specified character code. Now the MyChar variable would contain the value "d".

SQL query

You can also use the Chr function in a query.

SELECT Chr(37) AS Expr1, Chr(100) AS Expr2
FROM Orders


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

Need help with ASP, PHP, Javascript?

Let our experts help you.
 
 
ASPRunner Professional - Web Developer's Nirvana
Web hosting (PHP,ASP,MySQL,SQL server,unlimited emails)



Tags: ACCESS FUNCTION CHR ANSI CODE

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

  • Comments





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