Access: IsNumeric Function

In Access, the IsNumeric function returns a value indicating whether or not an expression can be converted to a numeric data type.

The syntax for the IsNumeric function is:

IsNumeric ( expression )

The required expression argument can be any numeric or string expression.The IsNumeric function returns
True (-1) if the entire expression is recognized as a number; otherwise, it returns False (0).

Example

IsNumeric (2006)              returns TRUE
IsNumeric ("2006")            returns TRUE
IsNumeric ("Number")          returns FALSE

VBA Code

Dim MyResult as Boolean 
MyResult = IsNumeric(“Number”)

This example uses the IsNumeric function to determine if a variable can be evaluated as a number. Now the MyResult variable would contain FALSE as a value.

SQL query

You can also use the IsNumeric function in a query.

SELECT IsNumeric([OwnerID]) AS Expr1
FROM AntiqueOwners
admin

admin

Leave a Reply

Your email address will not be published.