Results 1 to 6 of 6

Thread: This time about maskededitbox

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441
    I used masked edit box for phone number entry. The thing is, when I check the len, no matter what, I get back 14. Any ways around it?

    The 14 comes from (***) ***-****.

    Please HELP !!!

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    I set the format to (###) ###-####, and left the mask property blank. Then the length returned only the digits that were entered.

    Key in 9999999 and it is formatted () 999-9999 and returns a length of 7. Key in 1239999999 and it is formatted as (123) 999-9999 and returns a length of 10.

    Is this what you need ?

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Talking

    That is a new approach. I think i will use it instead. Thanks.

  4. #4
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    One thing to be aware of is this way does not prevent a user from entering character data into the field. You may need to set up some validation code. Putting the mask into the mask property does prevent a user from entering character data.

    Might experiment with it to be sure it does everything you need.

  5. #5
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    James,

    There is also a PromptInclude property for the Masked Edit Control that can be set to false. Then the prompt characters are not counted in the field length.

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Talking Thanks again

    Appreciate your help. I removed the masked and put in the format that you suggested. I used the count as an error check. Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width