Reverse part of a string

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.
 
F

fredg

[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.
 
G

Guest

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.
 

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

Extracting numbers from string 4
Filter on Multiple Fields 4
Refresh/OnCurrent Questions 3
regular expression 7
Min 12
Auto Fill Form Fields Type Mismatch Error 2
Number Printed in Reverse Order 5
message box 1

Top