G
Guest
I want to delete the first three characters in the string
thank you
thank you
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
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
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
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.
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
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
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