Reverse part of a string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

[Field1] on a form holds a 9 digit number - 123456789

I need code for the AfterUpdate Event which will place the firts six digits,
in reverse order, in [FIELD2 ] on the same form - 654321
Any help, thanks.
 
[Field1] on a form holds a 9 digit number - 123456789

I need code for the AfterUpdate Event which will place the firts six digits,
in reverse order, in [FIELD2 ] on the same form - 654321
Any help, thanks.

=StrReverse(Left([Field1],6))

will reverse the first 6 characters.
There is no need to store this value in [Field2].
Anytime you need to show the reversed characters, use the above
expression.
 
Thank you. Both work.

fredg said:
[Field1] on a form holds a 9 digit number - 123456789

I need code for the AfterUpdate Event which will place the firts six digits,
in reverse order, in [FIELD2 ] on the same form - 654321
Any help, thanks.

=StrReverse(Left([Field1],6))

will reverse the first 6 characters.
There is no need to store this value in [Field2].
Anytime you need to show the reversed characters, use the above
expression.
 
Back
Top