Learn 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 Microsoft Access 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.
The Asc function can be used in the following versions of Microsoft 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. For example:
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.
(scroll to see more)