Trim
Trim removes leading and trailing white space (such as space and tab characters) from a string. Trim uses the rules of the input locale when interpreting white space.
Syntax
Trim(<value>)
Parameters
<value>
Type: Text
Text value from which you want to remove leading and trailing spaces. See also
Specifying text strings as arguments.
(return)
Type: Text
Copy of <value> with leading and trailing spaces removed.
Notes
If the current data value is NULL, <value> is "" and the return value is "".
Example
The following example removes leading and trailing spaces from the address variable:
address.Trim()
For an example of using Trim in combination with UCase and Mid, see
UCase. For a data cleaning example, see Example 4: Cleaning other question types.
See also