Using the TRIM Function
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.
The results using a Query would be
In a Form you could set the Default Value of a Textbox to
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 ")
Access Beginner 9
Access Expert 8
Access Expert 9
See this FREE Tip on Trim and many others.
See this Blog Post on the Trim function.
You can find more about this by searching the website.
By: Alex Hedley
Click here to sign up for more FREE tips