Mask of MaskEdBox 
Author Message
 Mask of MaskEdBox

I want to use the next mask in a MaskEdBox:

#### ## ## ####

The space in between is the problem.
When I entre the value "1234 12 12 1234" and I save this the result after
a require is "1234  1 2  12 1". Why ???



Fri, 22 Aug 2003 17:59:00 GMT  
 Mask of MaskEdBox
If you have the blank spaces in your Mask, you should type them in at the
keyboard. With the Mask you have shown, try just typing in "123412121234"
and look at the MaskEdit control to see that the spaces are already there.
Also, remember that you can view the users entry in three different ways:
Text, ClipTex and FormattedText.

Rick


Quote:
> I want to use the next mask in a MaskEdBox:

> #### ## ## ####

> The space in between is the problem.
> When I entre the value "1234 12 12 1234" and I save this the result after
> a require is "1234  1 2  12 1". Why ???



Sat, 23 Aug 2003 01:37:47 GMT  
 Mask of MaskEdBox
Rick's suggestion seems good


Sat, 23 Aug 2003 09:50:24 GMT  
 Mask of MaskEdBox
Hopefully the typo in my first line didn't confuse Jeroen; it should have
read:

If you have the blank spaces in your Mask, you should NOT type them in at
the keyboard.

Sorry for any confusion.

Rick


Quote:
> Rick's suggestion seems good



Sat, 23 Aug 2003 11:09:59 GMT  
 Mask of MaskEdBox
Sorry if my first question is not clearly.

What I mend was the mask is set to "#### ## ## ####", I entre the value
"123412121234",
it looks on the form like "1234 12 12 1234" and when I save this the result
after
a require is "1234  1 2  12 1". Why ???



Sat, 23 Aug 2003 15:10:44 GMT  
 Mask of MaskEdBox
Could you post the code you are using to do the Save, any code you are using
to read it back in from wherever you saved it to, and the code you are using
to see the result you posted?

Rick


Quote:
> Sorry if my first question is not clearly.

> What I mend was the mask is set to "#### ## ## ####", I entre the value
> "123412121234",
> it looks on the form like "1234 12 12 1234" and when I save this the
result
> after
> a require is "1234  1 2  12 1". Why ???



Sat, 23 Aug 2003 16:06:17 GMT  
 Mask of MaskEdBox
Do you use code to save and get the data for the Mask edit, or you bind the
Mask edit to some data source?


Mon, 25 Aug 2003 13:31:25 GMT  
 Mask of MaskEdBox
The MaskEdBox is bind to a AdoRecordSet, on this recordset the requery is
done.


Mon, 25 Aug 2003 15:11:28 GMT  
 Mask of MaskEdBox
I will send you a  sample app, if it works but your app doesn't work, could
you send me a copy of your code.


Tue, 26 Aug 2003 12:07:31 GMT  
 Mask of MaskEdBox
If you (or anyone else posting here) are really working for MS PSS, please
add [msft] to your display name, and remove the nospam. If not MS, stop
using microsoft.com as your org / email.

This issue was escallated to PSS at the summit.

--

Randy Birch
MVP Visual Basic

Take the vb.net poll at:
http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

Please respond only to the newsgroups so all can benefit.


: I will send you a  sample app, if it works but your app doesn't work,
could
: you send me a copy of your code.
:



Thu, 28 Aug 2003 00:51:02 GMT  
 Mask of MaskEdBox
It is working in your sample.
In my code the PromptInclude is set of.
When I do this in your sample the 1234 12 12 1234 is saved like
123412121234.
But when I set PromptInclude on and then start the sample I get an error:
Unable to bind to DataMember "txt".

This error I get also in my app when I want to use PromptInclude, is this a
bug???



Fri, 29 Aug 2003 16:09:58 GMT  
 Mask of MaskEdBox
When a mask Edit Box control is bound to a field using a data control, and
the
mask property for the mask edit box is set to some value, like
### ## ## ####

If the PromptInclude is set to true, this requires strict compatibility,
character for character, between the Mask property and the format of the
data in the database. That means you must ensure the data in database is
like 1234 12 12 1234, not like 123412121234. Otherwise you will get the
error.

In the sample I send to you. The data in the database is in the correct
format (like 1234 12 12 1234), so even the PromptInclude is true, no error
will happen.

This is not a bug, you need make sure the data in your database is
consistent with the Mask.



Sat, 30 Aug 2003 10:53:13 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. How to put edit mask in MaskEdBox?

2. REPOST: Want mask chars but not prompt chars in MaskEdBox (from Aug 22)

3. Want mask chars but not prompt chars in MaskEdBox

4. maskedbox.mask

5. How to save MaskEdBox Blank Date Value having Mask ##/##/####

6. Data Entry Masks Without Masked Edit Box

7. VB6 Mask Doesn't Always Mask

8. Masked Edit Box and Control Masking

9. Setting Mask Edit Box Mask ?

10. MaskEdBox

11. MaskEdBox Question Update

12. MaskEdBox Question!

 

 
Powered by phpBB® Forum Software