Solved

Mask Edit

Posted on 2001-08-22
12
313 Views
Last Modified: 2008-02-20
Hi
  How could I use the mask edit to have the following input format.

  + or - 999.999999

ex          +156.894677
              -34.222

Any help is greatly appreciated.

Thanx

Dylan
0
Comment
Question by:b3cf
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6414866
I don't think that the Masked Edit Control has that level of flexibility.  However, you can write code in the KeyPress Event of a standard text box that could accomplish the same thing (that is, only allow a "+" or "-" as the first entry, and then only allow digits or a decimal point (only one) after the first KeyStroke.

0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6414908
Put this in the format property

+#,###,###.########;-#,###,###.########
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6414911
This has the format of 3.6 as you wanted

+###.######;-###.######
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:b3cf
ID: 6414940
Hi Dave
  It didnt work, I need the mask.
0
 

Author Comment

by:b3cf
ID: 6414961
Hi Dave
  It didnt work, I need the mask.
0
 

Author Comment

by:b3cf
ID: 6414999
Hi Dave
  It didnt work, I need the mask.
0
 
LVL 8

Accepted Solution

by:
Dave_Greene earned 50 total points
ID: 6415045
Ok, set your med box up like so

Format = +###.######;-###.######
Maxlength = 11
Mask = &###.######

should work.
0
 
LVL 1

Expert Comment

by:sanjeevjain1973
ID: 6416014
Dave Greene

After Setting
Mask = &###.######

Thne you can time any charecter like a,b,c,......


Sanjeev
0
 
LVL 39

Expert Comment

by:appari
ID: 6416234
set mask property to -999.999999
0
 
LVL 39

Expert Comment

by:appari
ID: 6416246
ignore my previous posting

use mask as 9###.######

but this accepts digit value at the 1 st digit place where mask is 9. need to write code to suppress that in keypress if first digit is other than +/- then make keyascii=0

0
 

Author Comment

by:b3cf
ID: 6417361
Thanx Dave. Thanx everybody else who contributed.

Dylan
0
 

Author Comment

by:b3cf
ID: 6419045
Thanx Dave. Thanx everybody else who contributed.

Dylan
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question