truncating characters from string of variable length

  • Thread starter Thread starter john rodgers
  • Start date Start date
J

john rodgers

Hello
In Access 2000, I need to remove the last nine characters from text
strings of variable length (need to remove zip and state from city
names of varying length). It seems neither the Left, Mid, or Rright
functions will help me. I already used Right to create a new field
containing the zip and state, but how can I now create a field
containing only the city.

Another trick here is that many of the city names have spaces in them,
so I cant use a function that relies on the space as a delimiter. The
only key I can think of is that the number of characters I want to
remove is fixed.

Thank you very much for any help you can offer.
John
 
John,

If I understand correctly, the strings are of variable
length but you always want to strip the last nine characters
off. If that is right, try the following

Left(strYourString,Len(strYourString - 9)

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
One small correction, one missed closing parentheses.

Left(strYourString,Len(strYourString)-9)
 
You are too good! Thanks.

Gary

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
Back
Top