This MSAccess tutorial explains how to use the Access Asc function with syntax and examples.
The Microsoft Access Asc function returns the NUMBER code that represents the specific character.
The syntax for the Asc function in MS Access is:
Asc ( string )
The Asc function can be used in the following versions of Microsoft Access:
Let's look at how to use the Asc function in MS Access:
Asc ("W") Result: 87 Asc ("Wednesday") Result: 87 Asc ("x") Result: 120
The Asc function can be used in VBA code in Microsoft Access.
Dim LResult As Integer LResult = Asc ("W")
In this example, the variable called LResult would now contain the value 87.
You can also use the Asc function in a query in Microsoft Access.
In this query, we have used the Asc function as follows:
This query will return the NUMBER code for "x" 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 AscValue.
(scroll to see more)