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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to trick 9 in textbox's inputmask?

Status
Not open for further replies.

kampretable

Vendor
Jan 3, 2008
6
I am creating inputmask for register number, eg 22.01.11.2008.0001.

thisform.nRegNumber.InputMask = "22.01.11.2008.9999"

Now it change, eg 22.09.19.2008.0001,

thisform.nRegNumber.InputMask = "22.09.19.2008.9999"

The problem is 9 in 09 and 19. It has focus.

How to trick 9 ? Only 9999 has the focus.

NB: These problem arise because operator can customize the InputMask, stored in table. I do not expected the register number change like that.
 
Kampretable,

Are you saying that you only want to let the user change the last four digits? If so, why not have a separate control for those four digits (with a mask "9999"), and display the rest of the number as a label or read-only text box?

If I've misunderstood the problem, please clarify.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi Mike and Dave!

I think user create inputmask like this:

22.01.11.9999.2008
22.01.9999.11.2008
22.9999.01.11.2008

But unexpectedly user create inputmask like this:

22.09.19.2008.9999
? ?


In this case I only want to let the user change the last four digits.

How to trick 9 in inputmask in one textbox only ?

Thx, Gbu!

NB: There are 6 textbox with customize inputmask in the form.
 
Kampretable,

It's still not clear why you want to let the user create or edit an input mask. As I said earlier, if only the last four digits of the field are editable, why not just give them a control in which they edit those four digits?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
You can't trick the inputmask to take some 9 digits as constant part of the mask and some 9s as the part the user can enter.

Especially if the user can choose the input mask you will need to roll your own way of allowing only certain parts editable.

You already have the problem that 9 does not only allow the entry of digits, but also + or -.

Bye, Olaf.
 
Hi Foxer!

I follow the logic of string, it has '',"" and [] to handle the problem if user use '," or [] in string variable.

Back to inputmask, is there any character that I can use to trick 9 in inputmask ?

Mike : This Application record migration, so they have different format in Population Index Number and Letter Registration Number. The user want to customize inputmask to speed their work in entry data.

Olaf: If I can not trick the inputmask, I have to try to handle it with 2 part mask. If only 4 digits problem I try Mike's idea.

Thx, Gbu!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top