Home page
 
 Home 
 ASP 
 PHP 
 SQL 
 HTML 
 JavaScript 
 Search 
 Contact 
 


Search
or browse popular tags
Got questions?

We got answers.

Ask your question about PHP, ASP, Javascript, HTML, CSS, hosting and get professional help, free of charge.

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

Home / SQL / Access Functions

 

 

Access: Len Function

Print Bookmark and Share

In Access, the Len function returns the length of the specified string.

The syntax for the Len function is:

Len ( string )

The required string argument is any valid string expression. If the argument to Len is Null, the function returns a Null.

Example

Len ("access")                         returns 6
Len ("webcheatsheat.com")      returns 17
Len ("hello world")                   returns 11

VBA Code

Dim MyNumber As Long
Dim MyString As String
MyString = "WebCheatSheet.com"
MyNumber = Len(MyString)

This example uses Len to return the number of characters in a string. Now the MyNumber variable would contain the value 17.

SQL query

You can also use the Asc function in a query.

SELECT Len([ItemDesired]) AS Expr1
FROM Orders


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

Need help with ASP, PHP, Javascript?

Let our experts help you.
 
 
ASPRunner Professional - Web Developer's Nirvana
Web hosting from $5/month (PHP,ASP,MySQL,unlimited emails)



Tags: ACCESS FUNCTION LEN LENGTH STRING

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

  • Comments





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