In this tutorial you will learn how to use the TRIM Function.
The (L/R) TRIM function returns a String containing a copy of a specified string without leading spaces (LTrim), trailing spaces (RTrim), or both leading and trailing spaces (Trim).
=TRIM( string )
string the value you wish to remove whitespace from
In this example we will work with a Name.
The result is Alex.
Query
The results using a Query would be
FORM
In a Form you could set the Default Value of a Textbox to
=TRIM("Alex ")
VBA
In a Form add a TEXTBOX control and rename it "txtTrim", then you could add the following in the Load Event.
Private Sub Form_Load()
txtTrim = Left("Alex ")
End Sub