Last updated: August 26, 2026.
The Trim function removes leading and trailing space characters from a string.
Syntax
Trim(string)| Argument | Description |
|---|---|
string | Text expression to trim |
Examples
Trim(" WebCheatSheet ") ' WebCheatSheet
CleanName: Trim([CustomerName])
SafeText: Trim(Nz([Notes], ""))Trim returns Null when its argument is Null. Wrap nullable fields with Nz when the intended result is an empty string.
See Microsoft’s Access function reference for related expression functions.