Functions and operators : TRIM( )

TRIM( )

Removes the leading and trailing blanks from a specified string. TRIM( ) does not remove blank characters between words.

Syntax

TRIM(str)

Argument

str

The string from which to remove leading and trailing blank characters.

Returns

A string with all leading and trailing blank characters removed.

Example

The following example uses TRIM( ) to remove all leading and trailing blank characters from values in the FirstName and LastName data fields. The expression uses the & operator to concatenate each trimmed FirstName value with a space, then with each trimmed LastName value.

TRIM([FirstName]) & " " & TRIM([LastName])