How To Remove Far Right Characters

G

Guest

I have fields that might look like this:

100106
98742306
9806

I always want to remove the "06" at the end. I'd like my result to look
like this:

1001
987423
98

I've been trying to using RTRIM without any luck. I am looking for a
solution that can be done as an expression.

Thanks!
 
B

BruceM

In a query it would be something like this:
NewField:
IIf(Right([YourField],2)="ng",Left([YourField],Len([YourField])-2),[YourField])

If every record ends with 06 it could just be:
NewField: Left([YourField],Len([YourField])-2)

Replace YourField with the actual field name, of course. In a text box
Replace NewField: with an = sign and put the expression in the control
source.
 

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

Similar Threads

Error in Microsoft Encryption Sample? 2
Remove preceeding characters 4
Fixed field characters 4
Date query 4
Remove leading space 3
Dell Support Assist 8
Contatenate quote character 2
Removing a character 4

Top