Access Val Function

Last updated: August 26, 2026.

The Val function reads the numeric prefix of a string and returns a number.

Syntax

Val(string)
ArgumentDescription
stringText expression beginning with the number to extract

Examples

Val("123.45 USD")     ' 123.45
Val("  -18 items")    ' -18
Val("USD 123")        ' 0

Val recognizes a period as the decimal separator. For locale-aware conversion of user input, validate the format and use an appropriate conversion function such as CDbl instead.

See Microsoft’s Access function reference for related expression functions.

admin

admin

Leave a Reply

Your email address will not be published.