Home Privacy Policy Feedback Link to us Site Map Forums

Access: Len Function


In Access, the Len function returns the length of the specified string.

The syntax for the Len function is:

Len ( text )

text is the string to return the length for.


For example:

Len ("techonthenet") would return 12.
Len ("Wednesday") would return 9.
Len ("apple pie") would return 9.

VBA Code

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

Dim LResult As Long

LResult = Len ("www.techonthenet.com")

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


SQL/Queries

You can also use the Len function in a query.