Access: Trim Function
In Access, the Trim function removes leading and trailing spaces from a string.
The syntax for the Trim function is:
Trim ( text )
text is the string that you wish to remove spaces from.
For example:
Trim (" Tech on the Net") would return "Tech on the Net" Trim (" Alphabet ") would return "Alphabet"
VBA Code
The Trim function can be used in VBA code. For example:
Dim LResult As String
LResult = Trim (" Alphabet ")
The variable LResult would now contain the value of "Alphabet".
SQL/Queries
You can also use the Trim function in a query.
