Chr()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

Chr()

Syntax

Chr( <NumericValue> )

 

Purpose

Chr() is a numeric conversion function that converts an ASCII numeric code to a character. It is the inverse of ASC().

 

Parameters

<NumericValue> is an ASCII code in the range of zero to 255.

 

Returns

Chr() returns a single character value whose ASCII code is specified by <NumericValue>.

 

Usage

You may use Chr() embed "invisible" characters in reports or data exports which do not actually display in the output, but which have side effects.

 

Example

In a data export to be used with Excel, you wish to embed a New Line character sequence in a single cell, causing the exported data for the cell to be formatted on multiple lines. The following expression would embed a new line command sequence between Salutation 1 and the Address fields:

 

.Salutation1. + Chr( 13 ) + Chr( 10 ) + .Address.