MaskEditBox Mystery... 
Author Message
 MaskEditBox Mystery...

I am puzzled beyond belief.

Using a MaskEdBox control to get a date input in Short Date format.
The Month and Year are pre-determined, so they appear as part of the
Input Mask.
I have code which creates an input mask from that data, leaving the DAY
section
as the only part of the mask that will accept input.

For example, when Month is January and Year is 1998:

        strMask="\0\1/##/\9\8"

It works good until I try to place a value in the box
for the Day. Notice:
        if I put in a number from 20-31,all is well BUT..
        if I input a two-digit number that has '0' or '1'
        as the first digit, the first digit is cut off!
In other words, if my code says..
        MaskEdBox1.Text="13"
the box displays
        01/3_/98
At runtime, though, the MaskEditBox responds to input as expected.

Thank you, anyone who can tell me what's going on!
(setting MaxLength to 8 or 12 made no difference)



Sat, 01 Jul 2000 03:00:00 GMT  
 MaskEditBox Mystery...

Quote:

> I am puzzled beyond belief.

> Using a MaskEdBox control to get a date input in Short Date format.
> The Month and Year are pre-determined, so they appear as part of the
> Input Mask.
> I have code which creates an input mask from that data, leaving the DAY
> section
> as the only part of the mask that will accept input.

> For example, when Month is January and Year is 1998:

>         strMask="\0\1/##/\9\8"

> It works good until I try to place a value in the box
> for the Day. Notice:
>         if I put in a number from 20-31,all is well BUT..
>         if I input a two-digit number that has '0' or '1'
>         as the first digit, the first digit is cut off!
> In other words, if my code says..
>         MaskEdBox1.Text="13"
> the box displays
>         01/3_/98
> At runtime, though, the MaskEditBox responds to input as expected.

> Thank you, anyone who can tell me what's going on!
> (setting MaxLength to 8 or 12 made no difference)

  For the sake of a quick test, try changing the mask to "\0\2/##/\9\8"
and see if the 20-29 values get cut off.  If so, it could actually be
matching the literal for some reason ????


Sun, 02 Jul 2000 03:00:00 GMT  
 MaskEditBox Mystery...

Thanks, Curtis. I tried your suggestion, and yes! It started behaving
strangely with entries beginning with "2" when I had "2" as a literal in
the mask.

I appreciate the fresh take on it. And I'll appreciate any other ideas.

Rob



Mon, 03 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Really need help a bug with VS.Net and MaskEditBox

2. Where is MaskEditBox Control in VB.Net ?

3. Is there a MaskEditBox replacement in .NET

4. MaskEditBox fails with EMPTY table !

5. MaskEditBox generates problem

6. MaskEditBox help

7. printform() doesn't print maskeditboxes...

8. MaskEditBox problems

9. Help! -newbie MaskEditBox question

10. CHANGING MASKEDITBOX BACKCOLOR WHEN ENABLED = FALSE

11. MaskEditBox generates problem

12. MaskEditBox help

 

 
Powered by phpBB® Forum Software