Home Privacy Policy Feedback Link to us Site Map

Access: Asc Function


In Access, the Asc function returns the NUMBER code that represents the specific character.

The syntax for the Asc function is:

Asc ( string )

string is the specified character to retrieve the NUMBER code for. If more than one character is entered, the function will return the value for the first character and ignore all of the characters after the first.


For example:

Asc ("W") would return 87.
Asc ("Wednesday") would return 87.
Asc ("x") would return 120.

VBA Code

The Asc function can be used in VBA code. For example:

Dim LResult As Integer

LResult = Asc ("W")

In this example, the variable called LResult would now contain the value 87.


SQL/Queries

You can also use the Asc function in a query.


View a listing of the ascii values.