Reduce the string length

  • Thread starter Thread starter Guest
  • Start date Start date
the string length is variable - we are importing from a ticketing system and
need to remove the first three characters for a mail merge
--
Erma


Rick B said:
make that....


Mid([SomeFieldName],4,Len([SomeFieldName)-3)

--
Rick B



Erma said:
I want to delete the first three characters in the string

thank you
 
That is why I used the LEN function to take the string from character number
4 through the end.


--
Rick B



Erma said:
the string length is variable - we are importing from a ticketing system and
need to remove the first three characters for a mail merge
--
Erma


Rick B said:
make that....


Mid([SomeFieldName],4,Len([SomeFieldName)-3)

--
Rick B



Erma said:
I want to delete the first three characters in the string

thank you
 
if your string is 123456789

that will take the string starting at digit 4 and going LEN-3 or 6
characters.

The result would be


456789




--
Rick B



Erma said:
the string length is variable - we are importing from a ticketing system and
need to remove the first three characters for a mail merge
--
Erma


Rick B said:
make that....


Mid([SomeFieldName],4,Len([SomeFieldName)-3)

--
Rick B



Erma said:
I want to delete the first three characters in the string

thank you
 
if your string is 123456789

that will take the string starting at digit 4 and going LEN-3 or 6
characters.

The result would be

456789

Erma and Rick,
All you really need is:

Mid([String],4)

No need to calculate the actual length of the string. Unless the
number of characters to show is entered, it will return the entire
string, from the 4th character on.
 
Fred: Thanks!!! I did not know that would work. I cave wasted a lot of
keystrokes over the last few years. :-)

--
Rick B



fredg said:
if your string is 123456789

that will take the string starting at digit 4 and going LEN-3 or 6
characters.

The result would be

456789

Erma and Rick,
All you really need is:

Mid([String],4)

No need to calculate the actual length of the string. Unless the
number of characters to show is entered, it will return the entire
string, from the 4th character on.
 
thank you
--
Erma


Rick B said:
That is why I used the LEN function to take the string from character number
4 through the end.


--
Rick B



Erma said:
the string length is variable - we are importing from a ticketing system and
need to remove the first three characters for a mail merge
--
Erma


Rick B said:
make that....


Mid([SomeFieldName],4,Len([SomeFieldName)-3)

--
Rick B



I want to delete the first three characters in the string

thank you
 
Actually, the 3rd argument (length) is optional. As it says in the Help
file, "If omitted or if there are fewer than length characters in the text
(including the character at start), all characters from the start position
to the end of the string are returned."

In other words, Mid([SomeFieldName], 4) is all you need, although
Mid([SomeFieldName],4,len([SomeFieldName])) should too.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Rick B said:
make that....


Mid([SomeFieldName],4,Len([SomeFieldName)-3)

--
Rick B



Erma said:
I want to delete the first three characters in the string

thank you
 
Thanks guys . . . my bulk mailing is in the mail with the merge the right
way. Thanks again.
--
Erma


Douglas J. Steele said:
Actually, the 3rd argument (length) is optional. As it says in the Help
file, "If omitted or if there are fewer than length characters in the text
(including the character at start), all characters from the start position
to the end of the string are returned."

In other words, Mid([SomeFieldName], 4) is all you need, although
Mid([SomeFieldName],4,len([SomeFieldName])) should too.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Rick B said:
make that....


Mid([SomeFieldName],4,Len([SomeFieldName)-3)

--
Rick B



Erma said:
I want to delete the first three characters in the string

thank you
 
Back
Top