PDA

View Full Version : To display two characters out of 10 in access



lucpian
11-20-2008, 01:17 PM
Hi all,

I wish to display two characters out of a string og 10. Please, how do I do that?

Thanks

lucpian

CreganTur
11-20-2008, 01:54 PM
I wish to display two characters out of a string og 10. Please, how do I do that?

Which 2 characters? Be specific in your questions so we can give the best help possible.

All examples below use the variable strTest, assuming that your 10 digit string is the variable's value.

If you want the left 2 characters:
Left(strTest, 2)

if you want the right 2 characters:
Right(strTest, 2)

If you want the 2 characters in postions 5 and 6 of the string:
Mid(strTest,5,2)

There are many, many other ways to split up the characters of a string. If one of the above doesn't point you in the right direction, please let us know :thumb