Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Counting Characters

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stefan - 23 Nov 2005 21:58 GMT
I need to create a field in a query which counts the number of characters in
another field.

I have Len([Policy#])

The problem is this is a linked table from another database (advantage).  
The field itself is always 20 characters.  So if there are 12
characters(alpha numeric) in the policy number the program defaults 8 blanks
spaces at the end.

So all Policy# are returning 20 characters.

How can I count everything but the blank spaces?

Signature

Thanks in advance
Stefan

fredg - 23 Nov 2005 22:06 GMT
> I need to create a field in a query which counts the number of characters in
> another field.
[quoted text clipped - 9 lines]
>
> How can I count everything but the blank spaces?

Len(Trim([Policy#]))
Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Stefan - 23 Nov 2005 22:35 GMT
Thanks worked perfectly
Signature

Thanks in advance
Stefan

> > I need to create a field in a query which counts the number of characters in
> > another field.
[quoted text clipped - 11 lines]
>
> Len(Trim([Policy#]))
KARL DEWEY - 23 Nov 2005 22:36 GMT
Use       Len(Replace([Policy#]," ",""))   to remove spaces before counting.

> I need to create a field in a query which counts the number of characters in
> another field.
[quoted text clipped - 9 lines]
>
> How can I count everything but the blank spaces?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.