A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need to determine length of field for query



 
 
Thread Tools Display Modes
  #1  
Old February 20th, 2010, 09:55 PM posted to microsoft.public.access.gettingstarted
BARRY
external usenet poster
 
Posts: 383
Default Need to determine length of field for query

I need to use a query that will show me in the address field all those
records where the address is longer than 35 characters. I want to be able to
shorten those to fit in a specific label. I can then use this syntax to also
abbreviate city names that are too long for the label
--
Barry
  #2  
Old February 20th, 2010, 10:17 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Need to determine length of field for query

On Sat, 20 Feb 2010 13:55:01 -0800, Barry
wrote:

I need to use a query that will show me in the address field all those
records where the address is longer than 35 characters. I want to be able to
shorten those to fit in a specific label. I can then use this syntax to also
abbreviate city names that are too long for the label


Create a query based on the table with a calculated field

AddrLen: Len([address])

Put a criterion of

35


on this field to find all the verbose addresses.

Abbreviating the city might not be all that easy, unless you were to have a
table of city names and acceptable abbreviations; you may want to do these
manually if there aren't too many.
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.