Home page
 
 Home 
 ASP 
 PHP 
 SQL 
 HTML 
 JavaScript 
 Search 
 Contact 
 
Search
or browse popular tags
Access Functions
Subscription

Sign up for the free email newsletter for new tips, tutorials and more. Enter your email address below, and then click the button.

Privacy Policy

RSS Twitter

Access: LTrim Function

Print

In Access, the LTrim function returns a copy of a string with leading spaces removed.

The syntax for the LTrim function is:

LTrim ( string )

The string argument can be any string expression. If string contains Null, Null is returned.

Example

LTrim(" WebCheatSheet ")       returns "WebCheatSheet "
LTrim("tutorials ")                   returns "tutorials "
LTrim(" articles")                    returns "articles"

VBA Code

Dim MyString, LTrimString
MyString = " Access "
RTrimString = Lrim(MyString)

This example uses the LTrim function to strip leading spaces from a string variable. Now the MyString variable would contain the value "Access ".

SQL query

You can also use the LTrim function in a query.

SELECT LTrim([ItemDesired]) AS Expr1
FROM Orders


If you'd like to see how it works, enter SQL statement and press Execute
 




Tags:

Add To: Add to dzone dzone | Digg this digg | Add to del.icio.us del.icio.us | Stumble it stumbleupon

  • Comments





Copyright © 2005-2014             www.WebCheatSheet.com All Rights Reserved.