Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text field formatting problem

Status
Not open for further replies.

jender624

Programmer
Jul 1, 2003
50
US
I have a field that I have a custom input mask on, like this:

__-____

There are two basic types of formats that it can hold:

123-4567
9W-1234

As you can see, the string before the hyphen can be 2 or 3 characters. I want to right fill the field when data is entered, instead of left filling. So I want this to happen:

___-___9
___-__9W
___-_9W1
___-9W12
__9-W123
_9W-1234

instead of this:

9W1-234_

This is cover the case of a 6 character code vs. a 7 character code. Is there a way to easily do this?

Thanks!


--------------------
jender624
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top