This MSAccess tutorial explains how to use the Access Chr function with syntax and examples.
The Microsoft Access Chr function returns the character based on the NUMBER code. See list of ASCII codes.
The syntax for the Chr function in MS Access is:
Chr ( number_code )
The Chr function can be used in the following versions of Microsoft Access:
Let's look at how to use the Chr function in MS Access:
Chr (87) Result: "W" Chr (105) Result: "i"
The Chr function can be used in VBA code in Microsoft Access.
Dim LResult As String LResult = Chr (87)
In this example, the variable called LResult would now contain the value "W".
You can also use the Chr function in a query in Microsoft Access.
In this query, we have used the Chr function as follows:
This query will return the character value for the NUMBER code 105 and display the results in a column called Expr1. You can replace Expr1 with a column name that is more meaningful.
The results would now be displayed in a column called ChrValue.
(scroll to see more)