Last updated: August 26, 2026.
The Len function returns the number of characters in a string or the number of bytes required to store a variable.
Syntax
Len(string | variable)| Argument | Description |
|---|---|
string | Text whose character count is required |
variable | A variable of a supported data type |
Examples
Len("WebCheatSheet") ' 13
CodeLength: Len([ProductCode])
SafeLength: Len(Nz([Notes], ""))Len returns Null for a Null expression. Trailing spaces in a string are counted, so combine Len with Trim when surrounding spaces should not count.
See Microsoft’s Access function reference for related expression functions.