Home Privacy Policy Feedback Link to us Site Map Forums

Access: LTrim Function


In Access, the LTrim function removes leading spaces from a string.

The syntax for the LTrim function is:

LTrim ( text )

Text is the string that you wish to remove leading spaces from.


For example:

LTrim ("  Tech on the Net") would return "Tech on the Net"
LTrim (" Alphabet  ") would return "Alphabet  "

VBA Code

The LTrim function can be used in VBA code. For example:

Dim LResult As String

LResult = LTrim ("   Alphabet   ")

The variable LResult would now contain the value of "Alphabet  ".


SQL/Queries

You can also use the LTrim function in a query.