truncate last character

  • Thread starter Thread starter 00 Hillary
  • Start date Start date
0

00 Hillary

How do I truncate the last character from a string in Access 97? Thanks.
 
Hi Hillary,

Use the LEFT and LEN functions to return a portion of your string.

LEFT Returns a Variant (String) containing a specified number of characters
from the left side of a string.
Syntax: Left(string, length)
LEN returns the length of a given string.
Syntax: Len(string)

To truncate the last character, if you are using vb code, your code would
look something like:

MyString = left(MyString, Len(MyString)-1))

Note: if you are doing this simply to remove trailing spaces from a string,
you would be better using the TRIM function.

Hope this helps,
Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top