Counting of characters

J

joost

How to create a column in same table which counts the
number of characters? For example:

column1 column2
1 1
1.1 2
1.2 2
1.2.1 3

I would appreciate if you could give me a brief example
how to solve this specific issue.

Many thanks,
Joost
 
R

RobFMS

There is a function, Len(), that you can use.
However, it appears from your example that you are leaving out punctuation
characters.

HTH

--

Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Problems with your database? Need to upgrade your application?
Contact the FMS Professional Solutions Group: www.fmsinc.com/consulting

Need a Book Recommendation?
www.fmsinc.com/toplevel/books.htm

Need software tools for Access, VB or .NET?
http://www.fmsinc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
G

George Hester

Dim varElement As Variant
Dim nCol2 As Double
VarElement = CVar("")
nCol2 = CDbl(0)
.............................
varElement = CVar("1.2.1")
varElement = Replace(varElement, ".", "")
If IsNumeric(CStr(varElement)) Then
nCol2 = CDbl(Len(varElement))
Else
MsgBox "Not a number"
End If

Column 2 will then be a Field you make and the above will be its data.
HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top